[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Revision History for A373157 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) = 1 if the 2-adic valuation of n is a multiple of 3, otherwise 0.
(history; published version)
#18 by Peter Luschny at Fri May 31 05:50:07 EDT 2024
STATUS

reviewed

approved

#17 by Michel Marcus at Fri May 31 04:00:09 EDT 2024
STATUS

proposed

reviewed

#16 by Amiram Eldar at Fri May 31 03:26:17 EDT 2024
STATUS

editing

proposed

#15 by Amiram Eldar at Fri May 31 03:10:26 EDT 2024
LINKS

<a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.

#14 by Amiram Eldar at Fri May 31 03:10:06 EDT 2024
MATHEMATICA

a[n_] := If[Divisible[IntegerExponent[n, 2], 3], 1, 0]; Array[a, 100] (* Amiram Eldar, May 31 2024 *)

#13 by Amiram Eldar at Fri May 31 03:08:15 EDT 2024
FORMULA

Sum_{k=1..n} a(k) ~ (4/7) * n. - Amiram Eldar, May 31 2024

STATUS

approved

editing

#12 by Michael De Vlieger at Wed May 29 07:04:39 EDT 2024
STATUS

proposed

approved

#11 by Antti Karttunen at Wed May 29 02:48:54 EDT 2024
STATUS

editing

proposed

#10 by Antti Karttunen at Wed May 29 02:32:35 EDT 2024
NAME

a(n) = 1 if the 2-adic valuation of n is a multiple of 3, otherwise 0. a(n) = 1 if A001511(n) is of the form 3k+1, otherwise 0, where A001511(n) is the exponent of the highest power of 2 dividing 2n.

PROG

(PARI) A373157(n) = (1==(valuation(2*n, 2)%3)); \\ After "isok" function in A191257

(PARI) A373157(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], !(f[k, 2]%3), 1)); };

Discussion
Wed May 29
02:48
Antti Karttunen: Added the mult keyword that I had forgotten, and streamlined the definition (and PARI-code).
#9 by Antti Karttunen at Wed May 29 02:32:01 EDT 2024
FORMULA

a(n) = [A001511A007814(n) == 1 0 (mod 3)], where [ ] is the Iverson bracket.

PROG

(PARI) A373157(n) = !(valuation(n, 2)%3);