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!)
A131642 a(n) = A001223(n) if the number A001223(n) appears the first time in A001223, a(n) = 1 otherwise. 0

%I #3 Mar 30 2012 18:49:46

%S 1,2,1,4,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,1,1,1,1,1,14,1,1,1,

%T 10,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

%N a(n) = A001223(n) if the number A001223(n) appears the first time in A001223, a(n) = 1 otherwise.

%C A001223(2)=2 is the first appearance of 2 in A001223, hence a(2) = 2. A001223(3)=2 appeared earlier for A001223(2)=A001223(3), therefore a(3) = 2.

%t a = {}; b = {}; For[n = 1, n < 90, n++, If[Length[Intersection[b, {Prime[n + 1] - Prime[n]}]] == 0, AppendTo[a, Prime[n + 1] - Prime[n]]; AppendTo[b, a[[ -1]]], AppendTo[a, 1]]]; a

%K nonn

%O 1,2

%A _Giovanni Teofilatto_, Sep 08 2007

%E Edited, corrected and extended by _Stefan Steinerberger_, Sep 26 2007

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 May 6 16:55 EDT 2024. Contains 372297 sequences. (Running on oeis4.)