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.
LINKS
FORMULA
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 07 2020
STATUS
approved