[go: up one dir, main page]

login
Search: a359794 -id:a359794
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers of the form (2*m - 1)*4^k where m >= 1, k >= 1.
+10
11
4, 12, 16, 20, 28, 36, 44, 48, 52, 60, 64, 68, 76, 80, 84, 92, 100, 108, 112, 116, 124, 132, 140, 144, 148, 156, 164, 172, 176, 180, 188, 192, 196, 204, 208, 212, 220, 228, 236, 240, 244, 252, 256, 260, 268, 272, 276, 284, 292, 300, 304, 308, 316, 320, 324, 332
OFFSET
1,1
COMMENTS
Numbers of terms in nonnegative integer sequences the sum of which is never a square.
The sum of a sequence of consecutive nonnegative integers starting with k is never a square for any k, if and only if the number of the terms in the sequence can be expressed as (2*m - 1) * 2^(2*n), m and n being any positive integers. (Proved by Alfred Vella, Jun 14 2005.)
Odious and evil terms alternate. - Vladimir Shevelev, Jun 22 2009
Even numbers whose binary representation ends in an even number of zeros. - Amiram Eldar, Jan 12 2021
From Antti Karttunen, Jan 28 2023: (Start)
Numbers k for which the parity of k is equal to that of A048675(k).
A multiplicative semigroup; if m and n are in the sequence then so is m*n. (End)
LINKS
FORMULA
a(n) = 6*n + O(log n). - Charles R Greathouse IV, Nov 03 2016 [Corrected by Amiram Eldar, Jan 12 2021]
a(n) = 2 * A036554(n) = 4 * A003159(n). - Amiram Eldar, Jan 12 2021
EXAMPLE
a( 1, 1 ) = 4, a( 2, 1) = 12, etc.
For a( 1, 1 ): the sum of 4 consecutive nonnegative integers (4k+6, if the first term is k) is never a square.
MATHEMATICA
Select[2 * Range[200], EvenQ @ IntegerExponent[#, 2] &] (* Amiram Eldar, Jan 12 2021 *)
PROG
(PARI) is(n)=my(e=valuation(n, 2)); e>1 && e%2==0 \\ Charles R Greathouse IV, Nov 03 2016
CROSSREFS
Intersection of A005843 and A003159.
Cf. A000069, A001969, A017113 (primitive terms), A036554, A328981 (characteristic function), A359794 (complement).
KEYWORD
nonn,easy
AUTHOR
Andras Erszegi (erszegi.andras(AT)chello.hu), May 30 2005
EXTENSIONS
Entry revised by N. J. A. Sloane, Jun 26 2005
More terms from Amiram Eldar, Jan 12 2021
STATUS
approved
a(n) = 1 if the 2-adic valuation of n is either 0 or odd, otherwise 0.
+10
7
1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1
OFFSET
1
FORMULA
Multiplicative with a(2^e) = 1 if e is odd, and 0 if e is even (and > 0), with a(p^e) = 1 for all odd primes p.
a(n) = 1 - A328981(n).
a(n) = A000035(n+A048675(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/6. - Amiram Eldar, Jan 24 2023
MATHEMATICA
a[n_] := If[(e = IntegerExponent[n, 2]) == 0 || OddQ[e], 1, 0]; Array[a, 100] (* Amiram Eldar, Jan 24 2023 *)
PROG
(PARI) A359832(n) = (!(n=valuation(n, 2))||(n%2));
(PARI) A359832(n) = { my(f=factor(n)); prod(k=1, #f~, ((2!=f[k, 1]) || (f[k, 2]%2))); };
(Python)
def A359832(n): return (n&1)|((~n & n-1).bit_length()&1) # Chai Wah Wu, Jan 24 2023
CROSSREFS
Characteristic function of A359794.
Cf. A000035, A007814, A048675, A328981 (one's complement), A359833 (Dirichlet inverse).
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 24 2023
STATUS
approved
a(n) = gcd(n, A059975(n)), where A059975 is fully additive with a(p) = p-1.
+10
6
1, 1, 1, 2, 1, 3, 1, 1, 1, 5, 1, 4, 1, 7, 3, 4, 1, 1, 1, 2, 1, 11, 1, 1, 1, 13, 3, 4, 1, 1, 1, 1, 3, 17, 5, 6, 1, 19, 1, 1, 1, 3, 1, 4, 1, 23, 1, 6, 1, 1, 3, 2, 1, 1, 1, 1, 1, 29, 1, 4, 1, 31, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 37, 5, 4, 1, 3, 1, 8, 1, 41, 1, 2, 5, 43, 3, 1, 1, 9, 1, 4, 1, 47, 1, 1, 1, 1, 1, 10
OFFSET
1,4
LINKS
PROG
(PARI)
A059975(n) = {my(f = factor(n)); sum(i = 1, #f~, f[i, 2]*(f[i, 1] - 1)); };
A373368(n) = gcd(n, A059975(n));
CROSSREFS
Cf. A059975, A108269 (positions of even terms), A359794 (of odd terms), A359832 (parity of terms).
Cf. also A082299, A373361, A373369.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 05 2024
STATUS
approved
a(n) = gcd(n, A276085(n)), where A276085 is the primorial base log-function.
+10
4
1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 3, 4, 1, 3, 1, 1, 1, 1, 1, 6, 1, 19, 1, 1, 1, 3, 1, 4, 5, 1, 1, 6, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 2, 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, 10, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 13, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1
OFFSET
1,4
PROG
(PARI)
A002110(n) = prod(i=1, n, prime(i));
A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
A373361(n) = gcd(n, A276085(n));
CROSSREFS
Cf. A108269 (positions of even terms), A328981 (their characteristic function), A359794 (positions of odd terms), A359832 (their characteristic function, parity of terms).
Cf. also A324198, A373145, A373362.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 02 2024
STATUS
approved
Numbers k such that A007814(k) is a prime number.
+10
2
4, 8, 12, 20, 24, 28, 32, 36, 40, 44, 52, 56, 60, 68, 72, 76, 84, 88, 92, 96, 100, 104, 108, 116, 120, 124, 128, 132, 136, 140, 148, 152, 156, 160, 164, 168, 172, 180, 184, 188, 196, 200, 204, 212, 216, 220, 224, 228, 232, 236, 244, 248, 252, 260, 264, 268, 276
OFFSET
1,1
COMMENTS
Numbers whose binary representation has a prime number of trailing 0's.
a(n)-1 is the sequence of numbers whose binary representation has a prime number of trailing 1's.
Numbers of the form (2^(p+1))*k + 2^p = 2^p * (2*k + 1), where p is prime and k >= 0.
All the terms are divisible by 4.
The asymptotic density of this sequence is Sum_{p prime} 1/2^(p+1) = 0.20734125492555583012... = A051006 / 2.
LINKS
MATHEMATICA
Select[Range[300], PrimeQ[IntegerExponent[#, 2]] &]
PROG
(PARI) is(n) = isprime(valuation(n, 2));
CROSSREFS
Subsequences: A017113, A051062.
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Feb 23 2024
STATUS
approved

Search completed in 0.094 seconds