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!)
A057820 First differences of sequence of consecutive prime powers (A000961). 20

%I #32 Apr 21 2022 13:10:18

%S 1,1,1,1,2,1,1,2,2,3,1,2,4,2,2,2,2,1,5,4,2,4,2,4,6,2,3,3,4,2,6,2,2,6,

%T 8,4,2,4,2,4,8,4,2,1,3,6,2,10,2,6,6,4,2,4,6,2,10,2,4,2,12,12,4,2,4,6,

%U 2,2,8,5,1,6,6,2,6,4,2,6,4,14,4,2,4,14,6,6,4,2,4,6,2,6,6,6,4,6,8,4,8,10,2,10

%N First differences of sequence of consecutive prime powers (A000961).

%C a(n) = 1 iff A000961(n) = A006549(k) for some k. - _Reinhard Zumkeller_, Aug 25 2002

%C Also run lengths of distinct terms in A070198. - _Reinhard Zumkeller_, Mar 01 2012

%H Michael B. Porter, <a href="/A057820/b057820.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000961(n+1) - A000961(n).

%e Odd differences arise in pairs in neighborhoods of powers of 2, like {..,2039,2048,2053,..} gives {..,11,5,..}

%p A057820 := proc(n)

%p A000961(n+1)-A000961(n) ;

%p end proc: # _R. J. Mathar_, Sep 23 2016

%t Map[Length, Split[Table[Apply[LCM, Range[n]], {n, 1, 150}]]] (* _Geoffrey Critzer_, May 29 2015 *)

%t Join[{1},Differences[Select[Range[500],PrimePowerQ]]] (* _Harvey P. Dale_, Apr 21 2022 *)

%o (PARI) isA000961(n) = (omega(n) == 1 || n == 1)

%o n_prev=1;for(n=2,500,if(isA000961(n),print(n-n_prev);n_prev=n)) \\ _Michael B. Porter_, Oct 30 2009

%o (Haskell)

%o a057820_list = zipWith (-) (tail a000961_list) a000961_list

%o -- _Reinhard Zumkeller_, Mar 01 2012

%Y Cf. A000961, A036616, A001223.

%K nonn

%O 1,5

%A _Labos Elemer_, Nov 08 2000

%E Offset corrected and b-file adjusted by _Reinhard Zumkeller_, Mar 03 2012

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 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)