A368900 LCM-transform of Doudna sequence.
1, 2, 3, 2, 5, 1, 3, 2, 7, 1, 1, 1, 5, 1, 3, 2, 11, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 2, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 2, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- A. Nowicki, Strong divisibility and LCM-sequences, arXiv:1310.2416 [math.NT], 2013.
- A. Nowicki, Strong divisibility and LCM-sequences, Am. Math. Mnthly 122 (2015), 958-966. [Defines the LCM-transform operation]
- Index entries for sequences related to binary expansion of n
Crossrefs
Programs
-
Mathematica
nn = 120; Array[Set[{s[#], a[#]}, {#, #}] &, 2]; j = 2; Do[If[EvenQ[n], Set[s[n], 2 s[n/2]], Set[s[n], Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[s[(n + 1)/2]]]]]; k = LCM[j, s[n]]; a[n] = k/j; j = k, {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Mar 24 2024 *)
-
PARI
up_to = 16384; LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2,len, g[n] = lcm(g[n-1],v[n]); b[n] = g[n]/g[n-1]); (b); }; A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t) }; v368900 = LCMtransform(vector(up_to,i,A005940(i))); A368900(n) = v368900[n];
-
PARI
A000265(n) = (n>>valuation(n,2)); A209229(n) = (n && !bitand(n,n-1)); A368900(n) = if(1==n, 1, my(x=A000265(n-1)); if(A209229(1+x), prime(1+valuation(n-1,2)), 1));
Formula
For n >= 1, Product_{d|n} a(A005941(d)) = n. [Implied by above]
For n > 1, if n-1 is a number of the form 2^i - 2^j with i >= j, then a(n) = prime(1+j), otherwise a(n) = 1.
Comments