OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n+1) - a(n) = 2*A075526(n) for all n.
G.f.: 1 + Sum_{ j>=1 } Sum_{ k>=1 } x^(pi(k/2)+j), where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
a(n) = 2*A008578(n) - 1. - Alois P. Heinz, Nov 28 2023
MATHEMATICA
Join[{1}, 2*Prime[Range[100]]-1] (* Harvey P. Dale, Nov 29 2015 *)
PROG
(PARI) a(n)=if(n>1, 2*prime(n-1)-1, 1) \\ Charles R Greathouse IV, Apr 29 2015
(Magma) [2*NthPrime(n-1)-1: n in [1..60]]; // Vincenzo Librandi, Jul 31 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Oct 04 2002
EXTENSIONS
New definition from Thomas Baruchel, Oct 21 2003
Offset changed from Vincenzo Librandi, Jul 31 2017
STATUS
approved