[go: up one dir, main page]

login
A331302
Number of 4k+3 composites encountered when traversing from n to the root of A005940-tree.
1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1
OFFSET
1,35
COMMENTS
For numbers > 1, iterate the map x -> A252463(x) which divides even numbers by 2 and for odd numbers shifts every prime in the prime factorization one index step towards smaller primes with A064989. a(n) counts the composite numbers of the form 4k+3 (A091236) encountered until 1 has been reached, including in the count also n itself if it is of the same form.
FORMULA
a(1) = 0, a(p) = 0 for all primes, otherwise a(n) = [n == 3 (mod 4)] + a(A252463(n)).
a(2^k * p) [with k>=0, p prime] = a(n^2) = a(2*(n^2)) = 0, with zeros occurring also on some other positions.
a(n) <= A292377(n).
EXAMPLE
Here -> stands for transition x -> A252463(x):
For n = 35, 35 mod 4 = 3, 35 -> 15 and 15 mod 4 = 3 also, but then 15 -> 6 (with 6 mod 4 = 2), and 6 -> 3, a prime, after which only noncomposites occur in the trajectory -> 2 -> 1, thus a(35) = 2 as there were exactly two 4k+3 composites on the whole path.
MATHEMATICA
Array[Count[FixedPointList[Which[# == 1, 1, EvenQ@ #, #/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ #] &, #], _?(And[CompositeQ@ #, Mod[#, 4] == 3] &)] &, 105] (* Michael De Vlieger, Feb 08 2020 *)
PROG
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A252463(n) = if(!(n%2), n/2, A064989(n));
A331302(n) = if((1==n)||isprime(n), 0, (3==(n%4))+A331302(A252463(n)));
CROSSREFS
Subsequences of the indices of zeros: A093641, A028982 (see A292583 for the explanation of the latter).
Sequence in context: A135468 A003196 A319581 * A062977 A357879 A072325
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 07 2020
STATUS
approved