cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 26 results. Next

A348596 a(n) = A068527(2*n+1).

Original entry on oeis.org

0, 1, 4, 2, 0, 5, 3, 1, 8, 6, 4, 2, 0, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2, 0, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2, 0, 17, 15, 13, 11, 9, 7, 5, 3, 1, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 24, 22, 20, 18, 16
Offset: 0

Views

Author

Ryan Jean, Feb 22 2022

Keywords

Crossrefs

Cf. A068527, A046092 (position of 0's), A056220 (position of 1's), A350962.

Programs

  • Python
    from math import isqrt
    def A348596(n): return (isqrt(2*n)+1)**2-2*n-1 # Chai Wah Wu, Feb 22 2022

Formula

a(n) = (ceiling(sqrt(2*n + 1)))^2 - (2*n + 1).

Extensions

Edited by N. J. A. Sloane, Feb 22 2022

A350962 a(n) = A068527(2*n).

Original entry on oeis.org

0, 2, 0, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 10, 8, 6, 4, 2, 0, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 0, 15, 13, 11, 9, 7, 5, 3, 1, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 23, 21, 19, 17, 15
Offset: 0

Views

Author

N. J. A. Sloane, Feb 22 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Ceiling[Sqrt[2*n]]^2 - 2*n; Array[a, 100, 0] (* Amiram Eldar, Feb 22 2022 *)
  • Python
    from math import isqrt
    def A350962(n): return 0 if n == 0 else (isqrt(2*n-1)+1)**2-2*n # Chai Wah Wu, Feb 22 2022

A249160 Smallest number of iterations k such that A068527^(k)(n)=A068527^(k+1)(n).

Original entry on oeis.org

1, 0, 2, 1, 2, 3, 1, 2, 1, 4, 3, 2, 3, 1, 2, 1, 3, 2, 4, 3, 2, 3, 1, 2, 1, 5, 2, 3, 2, 4, 3, 2, 3, 1, 2, 1, 3, 4, 5, 2, 3, 2, 4, 3, 2, 3, 1, 2, 1, 2, 4, 3, 4, 5, 2, 3, 2, 4, 3, 2, 3, 1, 2, 1, 2, 3, 2, 4, 3, 4, 5, 2, 3, 2, 4, 3, 2, 3, 1, 2, 1, 3, 4, 2, 3, 2, 4, 3, 4, 5, 2, 3, 2, 4, 3, 2, 3, 1, 2, 1
Offset: 1

Views

Author

Valtteri Raiko, Oct 22 2014

Keywords

Comments

Given a number n, denote its distance from next perfect square >= n as R(n), sequence A068527. The function R(n) has two fixed points, 0 and 2, and for all n>=3, R(n)=0, there exists a k>=0 such that R^(k)(n)=R^(k+1)(n)=0 or 2. This sequence gives the number of iterations needed to reach the fixed point starting at n.
This sequence is unbounded, but grows very slowly, reaching records of 1, 2, 3, 4, 6 etc at n=1, 3, 6, 10, 26, 170, 7226, etc.

Examples

			R(10) = 6, R(6) = 3, R(3) = 1, R(1) = 0, R(0) = 0. Thus a(10) = 4.
		

Crossrefs

Cf. A068527.

Programs

  • Maple
    A249160 := proc(n)
        local k,prev,this;
        prev := n ;
        for k from 1 do
            this := A068527(prev) ;
            if this = prev then
                return k-1;
            end if;
            prev := this ;
        end do:
    end proc:
    seq(A249160(n),n=1..80) ; # R. J. Mathar, Nov 17 2014
  • Mathematica
    r[n_]:=Ceiling[Sqrt[n]]^2-n;Table[Length[FixedPointList[r,n]]-2,{n,1,100}]
  • PARI
    r(n)=if(issquare(n),0,(sqrtint(n)+1)^2-n);
    le(n)=b=0;while(n!=0&&n!=2,b=b+1;n=r(n));return(b);
    range(n) = c=List(); for(a = 1, n, listput(c,a)); return(c);
    apply(le, range(100))

A277602 List of indices n such that A092488(n) < A068527(n).

Original entry on oeis.org

26, 27, 50, 65, 66, 82, 83, 84, 85, 86, 87, 88, 101, 102, 103, 104, 122, 123, 124, 125, 126, 127, 128, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 170, 171, 172, 173, 174, 175, 197, 198, 199, 200, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236
Offset: 1

Views

Author

Peter Kagey, Oct 22 2016

Keywords

Comments

No perfect squares occur in this sequence.
From David A. Corneth, Oct 26 2016: (Start)
A092488(n) <= A068527(n) for all n.
Numbers in this sequence are numbers of the form k^2 + m where m is fairly small compared to k^2 and less than 2k + 1. For m < 2k + 1, if k^2 + m isn't in the sequence then k^2 + m + 1 isn't either. Conjecture: 1 <= m <= t for some t < 2k+1. (End)

Examples

			A092488(26) = 9 != 10 = A068527(26).
		

Crossrefs

Extensions

Definition changed by David A. Corneth, Oct 26 2016

A001110 Square triangular numbers: numbers that are both triangular and square.

Original entry on oeis.org

0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056, 1882672131025, 63955431761796, 2172602007770041, 73804512832419600, 2507180834294496361, 85170343853180456676, 2893284510173841030625, 98286503002057414584576, 3338847817559778254844961, 113422539294030403250144100
Offset: 0

Views

Author

Keywords

Comments

Satisfies a recurrence of S_r type for r=36: 0, 1, 36 and a(n-1)*a(n+1)=(a(n)-1)^2. First observed by Colin Dickson in alt.math.recreational, Mar 07 2004. - Rainer Rosenthal, Mar 14 2004
For every n, a(n) is the first of three triangular numbers in geometric progression. The third number in the progression is a(n+1). The middle triangular number is sqrt(a(n)*a(n+1)). Chen and Fang prove that four distinct triangular numbers are never in geometric progression. - T. D. Noe, Apr 30 2007
The sum of any two terms is never equal to a Fermat number. - Arkadiusz Wesolowski, Feb 14 2012
Conjecture: No a(2^k), where k is a nonnegative integer, can be expressed as a sum of a positive square number and a positive triangular number. - Ivan N. Ianakiev, Sep 19 2012
For n=2k+1, A010888(a(n))=1 and for n=2k, k > 0, A010888(a(n))=9. - Ivan N. Ianakiev, Oct 12 2013
For n > 0, these are the triangular numbers which are the sum of two consecutive triangular numbers, for instance 36 = 15 + 21 and 1225 = 595 + 630. - Michel Marcus, Feb 18 2014
The sequence is the case P1 = 36, P2 = 68, Q = 1 of the 3-parameter family of 4th order linear divisibility sequences found by Williams and Guy. - Peter Bala, Apr 03 2014
For n=2k, k > 0, a(n) is divisible by 12 and is therefore abundant. I conjecture that for n=2k+1 a(n) is deficient [true for k up to 43 incl.]. - Ivan N. Ianakiev, Sep 30 2014
The conjecture is true for all k > 0 because: For n=2k+1, k > 0, a(n) is odd. If a(n) is a prime number, it is deficient; otherwise a(n) has one or two distinct prime factors and is therefore deficient again. So for n=2k+1, k > 0, a(n) is deficient. - Muniru A Asiru, Apr 13 2016
Numbers k for which A139275(k) is a perfect square. - Bruno Berselli, Jan 16 2018

Examples

			a(2) = ((17 + 12*sqrt(2))^2 + (17 - 12*sqrt(2))^2 - 2)/32 = (289 + 24*sqrt(2) + 288 + 289 - 24*sqrt(2) + 288 - 2)/32 = (578 + 576 - 2)/32 = 1152/32 = 36 and 6^2 = 36 = 8*9/2 => a(2) is both the 6th square and the 8th triangular number.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 193.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 38, 204.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923; see Vol. 2, p. 10.
  • Martin Gardner, Time Travel and other Mathematical Bewilderments, Freeman & Co., 1988, pp. 16-17.
  • Miodrag S. Petković, Famous Puzzles of Great Mathematicians, Amer. Math. Soc. (AMS), 2009, p. 64.
  • J. H. Silverman, A Friendly Introduction to Number Theory, Prentice Hall, 2001, p. 196.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 257-259.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 93.

Crossrefs

Other S_r type sequences are S_4=A000290, S_5=A004146, S_7=A054493, S_8=A001108, S_9=A049684, S_20=A049683, S_36=this sequence, S_49=A049682, S_144=A004191^2.
Cf. A001014; intersection of A000217 and A000290; A010052(a(n))*A010054(a(n)) = 1.
Cf. A005214, A054686, A232847 and also A233267 (reveals an interesting divisibility pattern for this sequence).
Cf. A240129 (triangular numbers that are squares of triangular numbers), A100047.
See A229131, A182334, A299921 for near-misses.

Programs

  • Haskell
    a001110 n = a001110_list !! n
    a001110_list = 0 : 1 : (map (+ 2) $
       zipWith (-) (map (* 34) (tail a001110_list)) a001110_list)
    -- Reinhard Zumkeller, Oct 12 2011
    
  • Magma
    [n le 2 select n-1 else Floor((6*Sqrt(Self(n-1)) - Sqrt(Self(n-2)))^2): n in [1..20]]; // Vincenzo Librandi, Jul 22 2015
  • Maple
    a:=17+12*sqrt(2); b:=17-12*sqrt(2); A001110:=n -> expand((a^n + b^n - 2)/32); seq(A001110(n), n=0..20); # Jaap Spies, Dec 12 2004
    A001110:=-(1+z)/((z-1)*(z**2-34*z+1)); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    f[n_]:=n*(n+1)/2; lst={}; Do[If[IntegerQ[Sqrt[f[n]]],AppendTo[lst,f[n]]],{n,0,10!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 12 2010 *)
    Table[(1/8) Round[N[Sinh[2 n ArcSinh[1]]^2, 100]], {n, 0, 20}] (* Artur Jasinski, Feb 10 2010 *)
    Transpose[NestList[Flatten[{Rest[#],34Last[#]-First[#]+2}]&, {0,1},20]][[1]]  (* Harvey P. Dale, Mar 25 2011 *)
    LinearRecurrence[{35, -35, 1}, {0, 1, 36}, 20] (* T. D. Noe, Mar 25 2011 *)
    LinearRecurrence[{6,-1},{0,1},20]^2 (* Harvey P. Dale, Oct 22 2012 *)
    (* Square = Triangular = Triangular = A001110 *)
    ChebyshevU[#-1,3]^2==Binomial[ChebyshevT[#/2,3]^2,2]==Binomial[(1+ChebyshevT[#,3])/2,2]=={1,36,1225,41616,1413721}[[#]]&@Range[5]
    True (* Bill Gosper, Jul 20 2015 *)
    L=0;r={};Do[AppendTo[r,L];L=1+17*L+6*Sqrt[L+8*L^2],{i,1,19}];r (* Kebbaj Mohamed Reda, Aug 02 2023 *)
  • PARI
    a=vector(100);a[1]=1;a[2]=36;for(n=3,#a,a[n]=34*a[n-1]-a[n-2]+2);a \\ Charles R Greathouse IV, Jul 25 2011
    
  • Scheme
    ;; With memoizing definec-macro from Antti Karttunen's IntSeq-library.
    (definec (A001110 n) (if (< n 2) n (+ 2 (- (* 34 (A001110 (- n 1))) (A001110 (- n 2))))))
    ;; Antti Karttunen, Dec 06 2013
    
  • Scheme
    ;; For testing whether n is in this sequence:
    (define (inA001110? n) (and (zero? (A068527 n)) (inA001109? (floor->exact (sqrt n)))))
    (define (inA001109? n) (= (* 8 n n) (floor->exact (* (sqrt 8) n (ceiling->exact (* (sqrt 8) n))))))
    ;; Antti Karttunen, Dec 06 2013
    

Formula

a(0) = 0, a(1) = 1; for n >= 2, a(n) = 34 * a(n-1) - a(n-2) + 2.
G.f.: x*(1 + x) / (( 1 - x )*( 1 - 34*x + x^2 )).
a(n-1) * a(n+1) = (a(n)-1)^2. - Colin Dickson, posting to alt.math.recreational, Mar 07 2004
If L is a square-triangular number, then the next one is 1 + 17*L + 6*sqrt(L + 8*L^2). - Lekraj Beedassy, Jun 27 2001
a(n) - a(n-1) = A046176(n). - Sophie Kuo (ejiqj_6(AT)yahoo.com.tw), May 27 2006
a(n) = A001109(n)^2 = A001108(n)*(A001108(n)+1)/2 = (A000129(n)*A001333(n))^2 = (A000129(n)*(A000129(n) + A000129(n-1)))^2. - Henry Bottomley, Apr 19 2000
a(n) = (((17+12*sqrt(2))^n) + ((17-12*sqrt(2))^n)-2)/32. - Bruce Corrigan (scentman(AT)myfamily.com), Oct 26 2002
Limit_{n->oo} a(n+1)/a(n) = 17 + 12*sqrt(2). See UWC problem link and solution. - Jaap Spies, Dec 12 2004
From Antonio Alberto Olivares, Nov 07 2003: (Start)
a(n) = 35*(a(n-1) - a(n-2)) + a(n-3);
a(n) = -1/16 + ((-24 + 17*sqrt(2))/2^(11/2))*(17 - 12*sqrt(2))^(n-1) + ((24 + 17*sqrt(2))/2^(11/2))*(17 + 12*sqrt(2))^(n-1). (End)
a(n+1) = (17*A029547(n) - A091761(n) - 1)/16. - R. J. Mathar, Nov 16 2007
a(n) = A001333^2 * A000129^2 = A000129(2*n)^2/4 = binomial(A001108,2). - Bill Gosper, Jul 28 2008
Closed form (as square = triangular): ( (sqrt(2)+1)^(2*n)/(4*sqrt(2)) - (1-sqrt(2))^(2*n)/(4*sqrt(2)) )^2 = (1/2) * ( ( (sqrt(2)+1)^n / 2 - (sqrt(2)-1)^n / 2 )^2 + 1 )*( (sqrt(2)+1)^n / 2 - (sqrt(2)-1)^n / 2 )^2. - Bill Gosper, Jul 25 2008
a(n) = (1/8)*(sinh(2*n*arcsinh(1)))^2. - Artur Jasinski, Feb 10 2010
a(n) = floor((17 + 12*sqrt(2))*a(n-1)) + 3 = floor(3*sqrt(2)/4 + (17 + 12*sqrt(2))*a(n-1) + 1). - Manuel Valdivia, Aug 15 2011
a(n) = (A011900(n) + A001652(n))^2; see the link about the generalized proof of square triangular numbers. - Kenneth J Ramsey, Oct 10 2011
a(2*n+1) = A002315(n)^2*(A002315(n)^2 + 1)/2. - Ivan N. Ianakiev, Oct 10 2012
a(2*n+1) = ((sqrt(t^2 + (t+1)^2))*(2*t+1))^2, where t = (A002315(n) - 1)/2. - Ivan N. Ianakiev, Nov 01 2012
a(2*n) = A001333(2*n)^2 * (A001333(2*n)^2 - 1)/2, and a(2*n+1) = A001333(2*n+1)^2 * (A001333(2*n+1)^2 + 1)/2. The latter is equivalent to the comment above from Ivan using A002315, which is a bisection of A001333. Using A001333 shows symmetry and helps show that a(n) are both "squares of triangular" and "triangular of squares". - Richard R. Forberg, Aug 30 2013
a(n) = (A001542(n)/2)^2.
From Peter Bala, Apr 03 2014: (Start)
a(n) = (T(n,17) - 1)/16, where T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = U(n-1,3)^2, for n >= 1, where U(n,x) denotes the Chebyshev polynomial of the second kind.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, -17; 1, 18].
See the remarks in A100047 for the general connection between Chebyshev polynomials of the first kind and 4th-order linear divisibility sequences. (End)
a(n) = A096979(2*n-1) for n > 0. - Ivan N. Ianakiev, Jun 21 2014
a(n) = (6*sqrt(a(n-1)) - sqrt(a(n-2)))^2. - Arkadiusz Wesolowski, Apr 06 2015
From Daniel Poveda Parrilla, Jul 16 2016 and Sep 21 2016: (Start)
a(n) = A000290(A002965(2*n)*A002965(2*n + 1)) (after Hugh Darwen).
a(n) = A000217(2*(A000129(n))^2 - (A000129(n) mod 2)).
a(n) = A000129(n)^4 + Sum_{k=0..(A000129(n)^2 - (A000129(n) mod 2))} 2*k. This formula can be proved graphically by taking the corresponding triangle of a square triangular number and cutting both acute angles, one level at a time (sum of consecutive even numbers), resulting in a square of squares (4th powers).
a(n) = A002965(2*n)^4 + Sum_{k=A002965(2*n)^2..A002965(2*n)*A002965(2*n + 1) - 1} 2*k + 1. This formula takes an equivalent sum of consecutives, but odd numbers. (End)
E.g.f.: (exp((17-12*sqrt(2))*x) + exp((17+12*sqrt(2))*x) - 2*exp(x))/32. - Ilya Gutkovskiy, Jul 16 2016

A070923 a(n) is the smallest value >= 0 of the form x^3 - n^2.

Original entry on oeis.org

0, 0, 4, 18, 11, 2, 28, 15, 0, 44, 25, 4, 72, 47, 20, 118, 87, 54, 19, 151, 112, 71, 28, 200, 153, 104, 53, 0, 216, 159, 100, 39, 307, 242, 175, 106, 35, 359, 284, 207, 128, 47, 433, 348, 261, 172, 81, 535, 440, 343, 244, 143, 40, 566, 459, 350, 239, 126, 11, 615, 496
Offset: 0

Views

Author

Benoit Cloitre, May 20 2002

Keywords

Comments

a(n) = 0 if n is a cube (i.e., n is in A000578(k)).
a(n) = A181138(n) if n is not a cube. - Zak Seidov, Mar 26 2013

Crossrefs

Formula

a(n) = ceiling(n^(2/3))^3 - n^2 = A077107(n)-n^2.

Extensions

a(0)=0 prepended by Alois P. Heinz, Mar 07 2022

A070929 Smallest integer >= 0 of the form x^2 - n^3.

Original entry on oeis.org

0, 0, 1, 9, 0, 19, 9, 18, 17, 0, 24, 38, 36, 12, 65, 106, 0, 128, 97, 30, 100, 148, 168, 154, 100, 0, 113, 198, 249, 260, 225, 138, 356, 163, 297, 389, 0, 423, 353, 217, 9, 248, 441, 17, 80, 79, 8, 506, 297, 0, 316, 574, 17, 119, 145, 89, 784, 568, 252, 737, 225, 548
Offset: 0

Views

Author

Benoit Cloitre, May 20 2002

Keywords

Comments

a(n)=0 iff n is a square.

Examples

			A077115(10) = 1024 = 32^2 is the least square >= 10^3 = 1000, therefore a(10) = 1024 - 1000 = 24.
		

Crossrefs

Programs

  • Mathematica
    f[n_]=Ceiling[n^(3/2)]^2-n^3;
    t1=Table[f[n], {n, 1, 90}]; t1 (* Clark Kimberling, Jan 30 2011 *)
  • PARI
    for(n=1,100,print1(ceil(n^(3/2))^2-n^3,","))

Formula

a(n) = ceiling(n^(3/2))^2 - n^3 = A077115(n) - n^3.

A146315 Prime differences of primes subtracted from nearest square.

Original entry on oeis.org

2, 7, 11, 13, 23, 29, 31, 47, 53, 59, 61, 79, 83, 89, 97, 127, 131, 137, 139, 167, 173, 179, 191, 193, 223, 227, 233, 239, 251, 293, 307, 311, 313, 317, 359, 383, 389, 397, 439, 443, 461, 467, 479, 547, 557, 563, 569, 571, 647, 653, 659, 673, 727, 743, 761, 773
Offset: 1

Views

Author

Enoch Haga, Oct 30 2008

Keywords

Comments

Terms in A146315 + A146316 produce a square

Examples

			a(6)=29 because when the prime 29 is subtracted from the square 36, the result is another prime, 7
		

Crossrefs

Programs

  • UBASIC
    10 'sq less pr are prime 20 N=1:O=1:C=1 30 A=3:S=sqrt(N) 40 B=N\A 50 if B*A=N then 120 60 A=A+2 70 if A<=S then 40 80 R=O^2:Q=R-N 90 if N31 then stop 120 N=N+2:if N
    				

Formula

{p in A000040: A068527(p) in A000040}. - R. J. Mathar, Sep 26 2011

A092488 a(n) = least k such that {n+0, n+1, n+2, n+3, ... n+k} has a nonempty subset the product of whose members is a square.

Original entry on oeis.org

0, 2, 1, 0, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 13, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 17
Offset: 1

Views

Author

R. K. Guy, Apr 02 2004

Keywords

Examples

			Often a(n) is the distance from n to the next square. But, e.g., a(26)=9 (not 10) because 27*28*30*32*35 is a square.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, B30.

Crossrefs

Programs

  • Mathematica
    (* This program is not suitable to compute a large number of terms *)
    a[n_] := Module[{n0, t}, n0 = Ceiling[Sqrt[n]]^2; If[n == n0, Return[0]]; Do[t = Table[n+j, {j, 0, k}]; If[AnyTrue[Subsets[t, {m}], IntegerQ[ Sqrt[ Times @@ #]]&], Return[k]], {k, 1, n0-n}, {m, 1, k+1}] ]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 200}] (* Jean-François Alcover, Nov 19 2016 *)

A146757 Number of primes p < 10^n such that s - p is prime, where s is the next square greater than p.

Original entry on oeis.org

2, 15, 68, 363, 2084, 13567, 95164, 705036, 5444255, 43211106, 351904307, 2921904565
Offset: 1

Views

Author

Enoch Haga, Nov 02 2008

Keywords

Comments

The number of primes p in the range 2 <= p <= 10^n for which The distance to the next larger square (A068527(p)) is also a prime. - R. J. Mathar, Sep 26 2011

Examples

			A(2) = 15 because at 10^2 there are 15 primes that, subtracted from the next higher value square, produce prime differences: {2, 7, 11, 13, 23, 29, 31, 47, 53, 59, 61, 79, 83, 89, 97}.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Prime[Range[PrimePi[10^n]]], PrimeQ[Ceiling[Sqrt[#]]^2 - #] &]], {n, 6}] (* T. D. Noe, Mar 31 2013 *)
  • UBASIC
    10 'sq less pr are prime 20 N=1:O=1:C=1 30 A=3:S=sqrt(N):if N>10^3 then print N,C-1:stop 40 B=N\A 50 if B*A=N then 100 60 A=A+2 70 if A<=S then 40 80 R=O^2:Q=R-N 90 if N1 print R;N;Q;C:N=N+2:C=C+1:goto 30 100 N=N+2:if N
    				

Extensions

Name clarified by T. D. Noe, Mar 31 2013
a(8)-a(12) from Chai Wah Wu, Jun 22 2019
Showing 1-10 of 26 results. Next