cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A290515 a(n) = smallest number that is the start of a gap of size n between successive prime powers (A000961), or 0 if no such number exists.

Original entry on oeis.org

1, 5, 13, 19, 32, 53, 1024, 89, 512, 139, 536870912, 199, 144115188075855859, 293, 65521, 1831, 8192, 1069, 147573952589676412909, 887, 524288, 1129, 549755813888, 4177, 17179869184, 2477, 16384, 2971, 131072, 1331, 34359738337, 5591, 18014398509481951, 8467, 33554432, 9551
Offset: 1

Views

Author

Robert G. Wilson v, Aug 04 2017

Keywords

Comments

Conjecture: a(n) always exists.
When n is odd a(n) is equal to 2^k or 2^k-n for a suitable k. - Giovanni Resta, Aug 07 2017
Apparently, a(n) = A110968(n-1) - 1 for n >= 3. - Hugo Pfoertner, Jun 17 2024

Examples

			a(1) =  1 since  2 -  1 = 1;
a(2) =  5 since  7 -  5 = 2;
a(3) = 13 since 16 - 13 = 3;
a(4) = 19 since 23 - 19 = 4;
a(5) = 32 since 37 - 32 = 5; etc.
		

Crossrefs

Programs

  • Mathematica
    nxt[n_] := nxt[n] = Block[{k = n + 1}, While[! PrimePowerQ@k, k++]; k]; prv[n_] := prv[n] = Block[{k = n - 1}, While[! PrimePowerQ@k, k--]; k]; f[n_] := Block[{d = 0, exp = 2, p, q}, While[d == 0, p = prv[2^exp]; q = nxt[2^exp]; If[n == 2^exp - p, d = p]; If[n == q - 2^exp, d = 2^exp]; exp++]; d]; Do[ t[n] = f[n], {n, 3, 99, 2}]; p = 1; q = 2; t[_] = 0; While[p < 1110000, d = q - p; If[t[d] == 0, t[d] = p]; p = q; q = nxt@ q]; t@# & /@ Range@ 100

Extensions

a(13)-a(34) from Giovanni Resta, Aug 07 2017

A373334 a(n) is the least prime power (A246655) P such that P-n is the next smaller prime power below P.

Original entry on oeis.org

3, 7, 16, 23, 37, 59, 1031, 97, 521, 149, 536870923, 211, 144115188075855872, 307, 65536, 1847, 8209, 1087, 147573952589676412928, 907, 524309, 1151, 549755813911, 4201, 17179869209, 2503, 16411, 2999, 131101, 1361, 34359738368, 5623, 18014398509481984, 8501, 33554467, 9587
Offset: 1

Views

Author

Hugo Pfoertner, Jun 16 2024

Keywords

Comments

If powers of primes (A000961) were used instead of A246655, a(1) would be 2.

Crossrefs

Formula

a(n) = A290515(n) + n for n > 1.
Showing 1-2 of 2 results.