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.

A376309 Run-lengths of the sequence of first differences of prime-powers.

This page as a plain text file.
%I A376309 #12 Jan 18 2025 16:33:48
%S A376309 3,1,2,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,
%T A376309 1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,
%U A376309 1,1,2,1,1,1,1,1,3,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,2,1,1,1,2,1,2,1,1,2,1,1,1,2
%N A376309 Run-lengths of the sequence of first differences of prime-powers.
%H A376309 Antti Karttunen, <a href="/A376309/b376309.txt">Table of n, a(n) for n = 1..20000</a>
%e A376309 The sequence of prime-powers (A246655) is:
%e A376309   2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, ...
%e A376309 The sequence of first differences (A057820) of prime-powers is:
%e A376309   1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, ...
%e A376309 with runs:
%e A376309   (1,1,1),(2),(1,1),(2,2),(3),(1),(2),(4),(2,2,2,2),(1),(5),(4),(2),(4), ...
%e A376309 with lengths A376309 (this sequence).
%t A376309 Length/@Split[Differences[Select[Range[100],PrimePowerQ]]]
%o A376309 (PARI)
%o A376309 up_to = 20000;
%o A376309 A376309list(up_to) = { my(v=vector(up_to), ppp=2, pd=1, d, rl=0, k=2, i=0); while(i<#v, k++; if(isprimepower(k), d = k-ppp; ppp = k; if(d == pd, rl++, i++; v[i] = rl; rl = 1; pd = d))); (v); };
%o A376309 v376309 = A376309list(up_to);
%o A376309 A376309(n) = v376309[n]; \\ _Antti Karttunen_, Jan 18 2025
%Y A376309 For runs of prime-powers increasing by one we have A174965.
%Y A376309 For primes instead of prime-powers we have A333254.
%Y A376309 For squarefree numbers instead of prime-powers we have A376306.
%Y A376309 For compression instead of run-lengths we have A376308.
%Y A376309 For run-sums instead of run-lengths we have A376310.
%Y A376309 For positions of first appearances we have A376341, sorted A376340.
%Y A376309 A000040 lists the prime numbers, differences A001223.
%Y A376309 A000961 and A246655 list prime-powers, first differences A057820.
%Y A376309 A003242 counts compressed compositions, ranks A333489.
%Y A376309 A005117 lists squarefree numbers, differences A076259.
%Y A376309 A024619 and A361102 list non-prime-powers, first differences A375708.
%Y A376309 A116861 counts partitions by compressed sum, by compressed length A116608.
%Y A376309 A124767 counts runs in standard compositions, anti-runs A333381.
%Y A376309 A238130, A238279, A333755 count compositions by number of runs.
%Y A376309 A274174 counts contiguous compositions, ranks A374249.
%Y A376309 A373948 encodes compression using compositions in standard order.
%Y A376309 Cf. A001597, A006549, A025475, A037201, A053289, A110969, A120430, A251092, A373822, A375706.
%K A376309 nonn
%O A376309 1,1
%A A376309 _Gus Wiseman_, Sep 22 2024
%E A376309 More terms from _Antti Karttunen_, Jan 18 2025