A161182 Successive differences between positions of squares in list of nonprimes.
1, 1, 3, 5, 6, 9, 9, 12, 13, 16, 16, 19, 20, 22, 25, 25, 26, 30, 31, 33, 34, 36, 38, 41, 40, 43, 46, 47, 48, 51, 53, 53, 56, 57, 60, 61, 64, 66, 65, 68, 69, 72, 76, 75, 78, 78, 83, 82, 82, 89, 90, 88, 89, 95, 96, 100, 101, 98, 104, 103, 105, 110, 108, 112, 115, 115, 118, 120
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A078435, sequence of positions of squares in sequence of nonprimes.
Programs
-
Maple
A038107 := proc(n) numtheory[pi]( n^2) ; end: A078435 := proc(n) n^2-A038107(n) ; end: A161182 := proc(n) A078435(n)-A078435(n-1) ; end: seq(A161182(n),n=1..100) ; # R. J. Mathar, Jun 22 2009
-
Mathematica
With[{nn=5000},Differences[Flatten[Position[Complement[Range[0,nn], Prime[ Range[ PrimePi[nn]]]],?(IntegerQ[Sqrt[#]]&)]]]] (* _Harvey P. Dale, Mar 03 2014 *)
Formula
Extensions
Corrected and extended by R. J. Mathar, Jun 22 2009