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!)
A074038 If n is the k-th single (i.e., non-twin) prime then a(n) = k, otherwise a(n) = 0. 3
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,23
LINKS
FORMULA
A007510(a(n)) = n.
MATHEMATICA
upto = 100;
A074038list[upto_] := Module[{k = 0, v = Table[0, {upto}], n},
For[n = 1, n <= upto, n++, If[PrimeQ[n] && (2 == n ||
((!PrimeQ[n-2]) && (!PrimeQ[n+2]))), k++; v[[n]] = k,
v[[n]] = 0]]; v];
v074038 = A074038list[upto];
a[n_] := v074038[[n]];
Table[a[n], {n, 1, upto}] (* Jean-François Alcover, Dec 03 2021, after PARI code *)
PROG
(PARI)
up_to = 65537;
A074038list(up_to) = { my(k=0, v=vector(up_to)); for(n=1, up_to, if(isprime(n)&&(2==n||((!isprime(n-2))&&(!isprime(n+2)))), k++; v[n]=k, v[n] = 0)); (v); };
v074038 = A074038list(up_to);
A074038(n) = v074038[n];
CROSSREFS
Sequence in context: A089811 A091888 A083928 * A204843 A204853 A303709
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 13 2002
STATUS
approved

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 18 18:20 EDT 2024. Contains 371781 sequences. (Running on oeis4.)