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.

A376341 Position of first appearance of n in A057820, the sequence of first differences of prime-powers, or 0 if n does not appear.

Original entry on oeis.org

1, 5, 10, 13, 19, 25, 199, 35, 118, 48, 28195587, 61, 3745011205066703, 80, 6635, 312, 1079, 207, 3249254387600868788, 179, 43580, 216, 21151968922, 615, 762951923, 403, 1962, 466, 12371, 245, 1480223716, 783, 494890212533313, 1110, 2064590, 1235, 375744164943287809536
Offset: 1

Views

Author

Gus Wiseman, Sep 22 2024

Keywords

Comments

For odd n either a(n) or a(n)+1 is in A024622 (unless a(n) = 0), corresponding to cases where the smaller or the larger term in the pair of consecutive prime powers, respectively, is a power of 2. - Pontus von Brömssen, Sep 27 2024

Examples

			a(4) = 13, because the first occurrence of 4 in A057820 is at index 13. The corresponding first pair of consecutive prime powers with difference 4 is (19, 23), and a(4) = A025528(23) = 13.
a(61) = A024622(96), because the first pair of consecutive prime powers with difference 61 is (2^96, 2^96+61), and A025528(2^96+61) = A024622(96).
		

Crossrefs

For compression instead of first appearances we have A376308.
For run-lengths instead of first appearances we have A376309.
For run-sums instead of first appearances we have A376310.
For squarefree numbers instead of prime-powers we have A376311.
The sorted version is A376340.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, first differences A057820.
A024619 and A361102 list non-prime-powers, first differences A375708.
A003242 counts compressed compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259.
A116861 counts partitions by compressed sum, by compressed length A116608.

Programs

  • Mathematica
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    q=Differences[Select[Range[100],#==1||PrimePowerQ[#]&]];
    Table[Position[q,k][[1,1]],{k,mnrm[q]}]

Formula

A057820(a(n)) = n whenever a(n) > 0. - Pontus von Brömssen, Sep 24 2024

Extensions

Definition modified by Pontus von Brömssen, Sep 26 2024
More terms from Pontus von Brömssen, Sep 27 2024