A246272 Starting from n, the number of iterations of A003961 needed before the result has only prime factors of the form 4k+1 (a(1) = 0). [Where A003961(n) shifts the prime factorization of n one step towards larger primes].
0, 2, 1, 2, 0, 5, 2, 2, 1, 9, 1, 5, 0, 2, 4, 2, 0, 5, 2, 9, 8, 2, 1, 5, 0, 6, 1, 2, 0, 23, 1, 2, 1, 5, 3, 5, 0, 2, 1, 9, 0, 49, 2, 2, 4, 9, 1, 5, 2, 9, 5, 6, 0, 5, 7, 2, 4, 2, 1, 23, 0, 2, 8, 2, 0, 5, 2, 5, 1, 9, 1, 5, 0, 6, 4, 2, 2, 23, 2, 9, 1, 5, 1, 49, 0, 2, 8, 2, 0, 23, 6, 9, 1, 6, 4, 5, 0, 2, 1, 9
Offset: 1
Keywords
Examples
Consider n = 6 = 2*3 = p_1 * p_2. Five is the least number of iterations of A003961(n) (which increments by one the prime indices of prime factorization of n), before both primes are of the form 4k+1: p_2 = 3, p_3 = 5 (4k+3 & 4k+1), p_3 = 5, p_4 = 7 (4k+1 & 4k+3), p_4 = 7, p_5 = 11 (4k+3 & 4k+3), p_5 = 11, p_6 = 13 (4k+3 & 4k+1), p_6 = 13, p_7 = 17 (4k+1 & 4k+1), thus a(6) = 5.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10001
Crossrefs
Programs
-
PARI
default(primelimit, 2^22) A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus A065338(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = (f[i, 1]%4)); factorback(f); A246272(n) = {my(i); i=0; while((A065338(n)!=1), i++; n = A003961(n)); i}; for(n=1, 10001, write("b246272.txt", n, " ", A246272(n)));
-
Scheme
(define (A246272 n) (let loop ((i 0) (n n)) (if (= 1 (A065338 n)) i (loop (+ i 1) (A003961 n)))))
-
Scheme
;; Requires memoizing definec-macro. (definec (A246272 n) (if (= 1 (A065338 n)) 0 (+ 1 (A246272 (A003961 n)))))
Comments