A246345 a(0) = 16, after which, if (2*a(n-1)) - 1 = product_{k >= 1} (p_k)^(c_k) then a(n) = product_{k >= 1} (p_{k-1})^(c_k), where p_k indicates the k-th prime, A000040(k).
16, 29, 34, 61, 49, 89, 106, 199, 389, 310, 617, 524, 694, 1207, 1921, 3097, 3899, 4142, 3374, 3674, 4234, 8461, 16903, 20211, 37841, 22408, 26853, 26391, 48031, 68605, 137201, 81272, 108334, 137809, 266737, 512627, 347932, 497005, 982081, 1942279, 3855031, 5292209
Offset: 0
Keywords
Examples
Start with a(0) = 16; then after each new term is obtained by doubling the previous term, from which one is subtracted, after which each prime factor is replaced with the previous prime: 16 -> ((2*16)-1) = 31 = p_1, and p_10 = 29, thus a(1) = 29. 29 -> ((2*29)-1) = 57 = 3*19 = p_2 * p_8, and p_1 * p_7 = 2*17 = 34, thus a(2) = 34.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..1001
Crossrefs
Programs
-
Mathematica
nxt[n_]:=Times@@(NextPrime[#,-1]&/@(Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[2 n-1]])); NestList[nxt,16,50] (* Harvey P. Dale, Apr 04 2015 *)
-
PARI
default(primelimit, 2^30); 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)}; A064216(n) = A064989((2*n)-1); k = 16; for(n=0, 1001, write("b246345.txt", n, " ", k); k = A064216(k)); (Scheme, with memoization-macro definec) (definec (A246345 n) (if (zero? n) 16 (A064216 (A246345 (- n 1)))))
Formula
a(0) = 16, a(n) = A064216(a(n-1)).
Comments