login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A219964 a(n) = product(i >= 0, (P(n, i)/P(n-1, i))^(2^i)) where P(n, i) = product(p prime, n/2^(i+1) < p <= n/2^i). 2
1, 1, 2, 3, 2, 5, 3, 7, 4, 1, 5, 11, 9, 13, 7, 1, 16, 17, 1, 19, 25, 1, 11, 23, 81, 1, 13, 1, 49, 29, 1, 31, 256, 1, 17, 1, 1, 37, 19, 1, 625, 41, 1, 43, 121, 1, 23, 47, 6561, 1, 1, 1, 169, 53, 1, 1, 2401, 1, 29, 59, 1, 61, 31, 1, 65536, 1, 1, 67, 289, 1, 1, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) is 1 or a prime or an even power of a prime (A084400, A050376).
If n > 0 then a(n) = 1 if and only if n is an element of A110473.
LINKS
FORMULA
a(n) = A220027(n) / A220027(n-1).
EXAMPLE
a(20) = (7/(5*7))^2*((3*5)/3)^4 = 25.
a(22) = ((13*17*19)/(11*13*17*19))*((7*11)/7)^2 = 11.
MAPLE
A219964 := proc(n) local l, m, z;
if isprime(n) then RETURN(n) fi;
z := 1; l := n - 1; m := n;
do l := iquo(l, 2); m := iquo(m, 2);
if l = 0 then break fi;
if l < m then if isprime(l+1) then RETURN((l+1)^z) fi fi;
z := z + z;
od; 1 end: seq(A219964(k), k=0..71);
MATHEMATICA
a[n_] := Module[{l, m, z}, If[PrimeQ[n] , Return[n] ]; z = 1; l = Max[0, n - 1]; m = n; While[True, l = Quotient[l, 2]; m = Quotient[m, 2]; If[l == 0 , Break[]]; If[l < m , If[ PrimeQ[l+1], Return[(l+1)^z]]]; z = z+z]; 1]; Table[a[k], {k, 0, 71}] (* Jean-François Alcover, Jan 15 2014, after Maple *)
PROG
(J)
genSeq=: 3 :0
p=. x: i.&.(_1&p:) y1=.y+1
i=.(#~y1>])&.> <:@((i.@>.&.(2&^.)y1)*])&.> p
y{.(; p(^2x^0, i.@<:@#)&.>i) (; i) } y1$1
)
(Sage)
def A219964(n):
if is_prime(n): return n
z = 1; l = max(0, n-1); m = n
while true:
l = l // 2
m = m // 2
if l == 0: break
if l < m:
if is_prime(l+1): return (l+1)^z
z = z + z
return 1
[A219964(n) for n in (0..71)]
CROSSREFS
Cf. A220027, the partial products of a(n).
Sequence in context: A370833 A341676 A139421 * A165500 A341679 A072505
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:49 EDT 2024. Contains 371936 sequences. (Running on oeis4.)