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!)
A154279 List of pairs (a(n),b(n)): a(n) = prime(n) - prime(n-1) + a(n-1); b(n) = (prime(n) - prime(n-1))*b(n-1). 1
0, 1, 2, 1, 3, 1, 5, 2, 7, 4, 11, 16, 13, 32, 17, 128, 19, 256, 23, 1024, 29, 6144, 31, 12288, 37, 73728, 41, 294912, 43, 589824, 47, 2359296, 53, 14155776, 59, 84934656, 61, 169869312, 67, 1019215872, 71, 4076863488, 73, 8153726976, 79, 48922361856, 83 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
There are primes associated with the product sequence:
Flatten[Table[If[PrimeQ[b[n] - 1], b[n] - 1, If[PrimeQ[b[n] + 1], b[ n] + 1, {}]], {n, 0, 30}]].
{2, 2, 2, 3, 3, 17, 31, 127, 257, 6143, 12289, 73727, 294911, 14155777, 169869311, 4076863487, 1174136684543}
LINKS
FORMULA
{a(n),b(n)}:
a(n) = Prime[n] - Prime[n-1] + a(n-1);
b(n) = ( Prime[n] - Prime[n-1] )*b(n-1).
MATHEMATICA
a[0] = 0; a[1] = 2; a[n_] := a[n] = Prime[n] - Prime[n - 1] + a[n - 1];
b[0] = 1; b[1] = 1; b[n_] := b[n] = (Prime[n] - Prime[n - 1])*b[n - 1];
Flatten[Table[{a[n], b[n]}, {n, 0, 30}]]
PROG
(PARI) a(n)=if(n<4, return(if(n>2, 1, n))); my(k=n\2, p=prime(k-1), q=nextprime(p+1)); if(n%2, (q-p)*a(n-2), q-p + a(n-2)) \\ Charles R Greathouse IV, Sep 09 2016
CROSSREFS
Cf. A081411.
Sequence in context: A011129 A262364 A266768 * A065370 A147783 A214340
KEYWORD
nonn,tabf,less
AUTHOR
Roger L. Bagula, Jan 06 2009
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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)