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-9 of 9 results.

A195034 Vertex number of a square spiral in which the length of the first two edges are the legs of the primitive Pythagorean triple [21, 20, 29]. The edges of the spiral have length A195033.

Original entry on oeis.org

0, 21, 41, 83, 123, 186, 246, 330, 410, 515, 615, 741, 861, 1008, 1148, 1316, 1476, 1665, 1845, 2055, 2255, 2486, 2706, 2958, 3198, 3471, 3731, 4025, 4305, 4620, 4920, 5256, 5576, 5933, 6273, 6651, 7011, 7410, 7790, 8210, 8610, 9051, 9471
Offset: 0

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

Zero together with partial sums of A195033.
The only primes in the sequence are 41 and 83 since a(n) = (1/2)*((2*n+(-1)^n+3)/4)*((82*n-43*(-1)^n+43)/4). - Bruno Berselli, Oct 12 2011
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives multiples of 29 (Cf. A195819). The vertices on the main diagonal are the numbers A195038 = (21+20)*A000217 = 41*A000217, where both 21 and 20 are the first two edges in the spiral. The distance "a" between nearest edges that are perpendicular to the initial edge of the spiral is 21, while the distance "b" between nearest edges that are parallel to the initial edge is 20, so the distance "c" between nearest vertices on the same axis is 29 because from the Pythagorean theorem we can write c = (a^2+b^2)^(1/2) = sqrt(21^2+20^2) = sqrt(441+400) = sqrt(841) = 29. - Omar E. Pol, Oct 12 2011

Crossrefs

Programs

  • Magma
    [(2*n*(41*n+83)-(2*n+43)*(-1)^n+43)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
    
  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{0,21,41,83,123},50] (* Harvey P. Dale, May 02 2012 *)
  • PARI
    concat(0, Vec(x*(21+20*x)/((1+x)^2*(1-x)^3) + O(x^60))) \\ Michel Marcus, Mar 08 2016

Formula

From Bruno Berselli, Oct 12 2011: (Start)
G.f.: x*(21+20*x)/((1+x)^2*(1-x)^3).
a(n) = (2*n*(41*n+83)-(2*n+43)*(-1)^n+43)/16.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
a(n)-a(-n-2) = A142150(n+1). (End)

A244635 a(n) = 29*n^2.

Original entry on oeis.org

0, 29, 116, 261, 464, 725, 1044, 1421, 1856, 2349, 2900, 3509, 4176, 4901, 5684, 6525, 7424, 8381, 9396, 10469, 11600, 12789, 14036, 15341, 16704, 18125, 19604, 21141, 22736, 24389, 26100, 27869, 29696, 31581, 33524, 35525, 37584, 39701, 41876, 44109, 46400, 48749
Offset: 0

Views

Author

Vincenzo Librandi, Jul 03 2014

Keywords

Crossrefs

Cf. similar sequences listed in A244630.

Programs

  • Magma
    [29*n^2: n in [0..40]];
    
  • Mathematica
    Table[29 n^2, {n, 0, 40}]
  • PARI
    a(n)=29*n^2 \\ Charles R Greathouse IV, Jun 17 2017

Formula

G.f.: 29*x*(1 + x)/(1 - x)^3. [corrected by Bruno Berselli, Jul 03 2014]
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2.
a(n) = 29*A000290(n). - Omar E. Pol, Jul 03 2014
From Elmo R. Oliveira, Dec 01 2024: (Start)
E.g.f.: 29*x*(1 + x)*exp(x).
a(n) = n*A195819(n). (End)

A249079 a(n) = 29*n + floor( n/29 ) + 0^( 1-floor( (14+(n mod 29))/29 ) ).

Original entry on oeis.org

0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, 377, 406, 436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 755, 784, 813, 842, 871, 900, 929, 958, 987, 1016, 1045, 1074, 1103, 1132, 1161, 1190, 1219, 1248, 1278, 1307, 1336
Offset: 0

Views

Author

Karl V. Keller, Jr., Oct 20 2014

Keywords

Comments

This is an approximation to A004942 (Nearest integer to n*phi^7, where phi is the golden ratio, A001622).

Examples

			n= 0, 29*n+floor(0.0) +0^(1-floor(0.48))=    0 +0 +0 =    0 (n/29=0,0^1=0).
n=14, 29*n+floor(0.48)+0^(1-floor(0.97))=  406 +0 +0 =  406 (0^1=0).
n=15, 29*n+floor(0.52)+0^(1-floor(1.0)) =  435 +0 +1 =  436 (0^0=1).
n=28, 29*n+floor(0.97)+0^(1-floor(1.45))=  812 +0 +1 =  813 (0^0=1).
n=29, 29*n+floor(1.0) +0^(1-floor(0.48))=  841 +1 +0 =  842 (n/29*1,0^1=0).
n=43, 29*n+floor(1.48)+0^(1-floor(0.97))= 1247 +1 +0 = 1248 (0^1=0).
n=44, 29*n+floor(1.52)+0^(1-floor(1.0)) = 1276 +1 +1 = 1278 (0^0=1).
n=58, 29*n+floor(2.0) +0^(1-floor(0.48))= 1682 +2 +0 = 1684 (n/29*2,0^1=0).
n=85, 29*n+floor(2.93)+0^(1-floor(1.41))= 2465 +2 +1 = 2468 (0^0=1).
n=86, 29*n+floor(2.97)+0^(1-floor(1.45))= 2494 +2 +1 = 2497 (0^0=1).
n=87, 29*n+floor(3.0) +0^(1-floor(0.48))= 2523 +3 +0 = 2526 (n/29*3,0^0=0).
		

Crossrefs

Cf. A001622 (phi), A195819 (29*n).
Cf. A004942 (round(n*phi^7)), A004922 (floor(n*phi^7)), A004962 (ceiling(n*phi^7)).

Programs

  • Magma
    [29*n + Floor(n/29) + 0^(1-Floor((14+(n mod 29))/29)) : n in [0..50]]; // Vincenzo Librandi, Nov 05 2014
  • PARI
    a(n) = 29*n + n\29 + 0^(1 - (14+(n % 29))\29); \\ Michel Marcus, Oct 25 2014
    
  • Python
    for n in range(101):
        print(29*n+n//29+0**(1-(14+n%29)//29), end=', ')
    
  • Python
    def A249079(n):
        a, b = divmod(n,29)
        return 29*n+a+int(b>=15) # Chai Wah Wu, Jul 27 2022
    

A305548 a(n) = 27*n.

Original entry on oeis.org

0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512
Offset: 0

Views

Author

Eric Chen, Jun 05 2018

Keywords

Crossrefs

For a(n) = k*n: A001489 (k=-1), A000004 (k=0), A001477 (k=1), A005843 (k=2), A008585 (k=3), A008591 (k=9), A008607 (k=25), A252994 (k=26), this sequence (k=27), A135628 (k=28), A195819 (k=29), A249674 (k=30), A135631 (k=31), A174312 (k=32), A044102 (k=36), A085959 (k=37), A169823 (k=60), A152691 (k=64).

Programs

  • Mathematica
    Range[0,2000,27]
  • PARI
    a(n)=27*n

Formula

a(n) = 27*n.
a(n) = A008585(A008591(n)) = A008591(A008585(n)).
G.f.: 27*x/(x-1)^2.
From Elmo R. Oliveira, Apr 10 2025: (Start)
E.g.f.: 27*x*exp(x).
a(n) = 2*a(n-1) - a(n-2). (End)

A248620 Lesser of twin primes of (29n + 1, 29n + 3).

Original entry on oeis.org

59, 1277, 1451, 3539, 4931, 5279, 9281, 9629, 10499, 11717, 12239, 16067, 22157, 23027, 23201, 24419, 26681, 31727, 34511, 35729, 37991, 40427, 45821, 47387, 48779, 55217, 59219, 60089, 70181, 70877, 72269, 75401, 77489, 79229, 80447, 83231, 85667, 88799
Offset: 1

Views

Author

Karl V. Keller, Jr., Oct 10 2014

Keywords

Comments

Lesser of twin primes where A195819(n) + 1 and A195819(n) + 3 are both primes.
Intersection of A001359 and A141977.

Examples

			29 * 2 + 1 = 59, which is prime, and 61 is also prime, so 59 is in the sequence.
29 * 44 + 1 = 1277, which is prime, and 1279 is also prime, so 1277 is in the sequence.
29 * 50 + 1 = 1451, which is prime, and 1453 is also prime, so 1451 is in the sequence.
29 * 54 + 1 = 1567, which is prime, but 1569 = 3 * 523, so 1567 is not in the sequence.
		

Crossrefs

Cf. A001359 (Lesser of twin primes), A195819 (Multiples of 29).
Cf. A141977 (Primes congruent to 1 mod 29), A141979 (Primes congruent to 3 mod 29).

Programs

  • Mathematica
    Select[58Range[1500] + 1, PrimeQ[#] && PrimeQ[# + 2] &] (* Alonso del Arte, Oct 31 2014 *)
    Select[29*Range[2,3150,2],AllTrue[#+{1,3},PrimeQ]&]+1 (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 16 2019 *)
  • PARI
    lista(nn) = {forstep (n=2, nn, 2, if (isprime(p=29*n+1) && isprime(29*n+3), print1(p, ", ")););} \\ Michel Marcus, Oct 17 2014
  • Python
    from math import *
    from sympy import isprime
    for n in range(0,10001):
      if isprime(58*n+1) and isprime(58*n+3): print (58*n+1,end=', ')
    

A248739 a(n) = 29*n + ceiling(n/29).

Original entry on oeis.org

0, 30, 59, 88, 117, 146, 175, 204, 233, 262, 291, 320, 349, 378, 407, 436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 755, 784, 813, 842, 872, 901, 930, 959, 988, 1017, 1046, 1075, 1104, 1133, 1162, 1191, 1220, 1249, 1278, 1307, 1336, 1365, 1394, 1423
Offset: 0

Views

Author

Karl V. Keller, Jr., Oct 13 2014

Keywords

Comments

This is an approximation to A004962 (ceiling of n*phi^7, where phi is the golden ratio, A001622).

Examples

			For n = 10, 29n + ceiling(n/29) = 290 + ceiling(0.3) = 290 + 1 = 291.
		

Crossrefs

Cf. A001622 (phi), A195819 (29*n).
Cf. A004922 (floor(n*phi^7)), A004962 (ceiling(n*phi^7)), A004942 (round(n*phi^7)).

Programs

  • Magma
    [29*n + Ceiling(n/29): n in [0..60]]; // Vincenzo Librandi, Oct 13 2014
  • Maple
    A248739:=n->29*n+ceil(n/29): seq(A248739(n), n=0..50); # Wesley Ivan Hurt, Oct 14 2014
  • Mathematica
    Table[29 n + Ceiling[n/29], {n, 0, 60}] (* Vincenzo Librandi, Oct 13 2014 *)
  • Python
    from math import *
    for n in range(0,101):
      print(n, (29*n+ceil(n/29.0)))
    

Formula

a(n) = 29*n + ceiling(n/29).
a(n) = A004962(n) for n < 871. - Joerg Arndt, Oct 18 2014

A248786 a(n) = 29*n + floor(n/29) + 0^n - 0^(n mod 29).

Original entry on oeis.org

0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, 725, 754, 783, 812, 841, 871, 900, 929, 958, 987, 1016, 1045, 1074, 1103, 1132, 1161, 1190, 1219, 1248
Offset: 0

Views

Author

Karl V. Keller, Jr., Oct 14 2014

Keywords

Comments

This is an approximation to A004922 (floor of n*phi^7, where phi is the golden ratio, A001622).
The "+ 0^n - 0^(n mod 29)" corrects a(n), for n=0 and multiples of 29. (See examples below.)

Examples

			For n = 0,  29*n + floor(0.0)  + 0^0  - 0^(0) =   0  + 0  + 1  - 1 = 0 (n=29*0).
For n = 28, 29*n + floor(0.97) + 0^28 - 0^(28)= 812  + 0  + 0  - 0 = 812.
For n = 29, 29*n + floor(1.0)  + 0^29 - 0^(0) = 841  + 1  + 0  - 1 = 841 (n=29*1).
For n = 31, 29*n + floor(1.1)  + 0^31 - 0^(2) = 899  + 1  + 0  - 0 = 900.
For n = 87, 29*n + floor(3.0)  + 0^87 - 0^(0) = 2523 + 3  + 0  - 1 = 2525 (n=29*3).
		

Crossrefs

Cf. A001622 (phi), A195819 (29*n).
Cf. A004922 (floor(n*phi^7)), A004962 (ceiling(n*phi^7)), A004942 (round(n*phi^7)).

Programs

  • Magma
    [(29*n+Floor(n/29))+ 0^n-0^(n mod 29): n in [0..60]]; // Vincenzo Librandi, Oct 14 2014
    
  • PARI
    a(n) = 29*n+ n\29 + 0^n - 0^(n % 29); \\ Michel Marcus, Oct 14 2014
  • Python
    from math import *
    from decimal import *
    getcontext().prec = 100
    for n in range(0,101):
      print(n, (29*n+floor(n/29.0))+ 0**n-0**(n%29))
    
  • Python
    def A248786(n):
        a, b = divmod(n,29)
        return 29*n+a-int(not b) if n else 0 # Chai Wah Wu, Jul 27 2022
    

A248572 a(n) = 29*n + 1.

Original entry on oeis.org

1, 30, 59, 88, 117, 146, 175, 204, 233, 262, 291, 320, 349, 378, 407, 436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 755, 784, 813, 842, 871, 900, 929, 958, 987, 1016, 1045, 1074, 1103, 1132, 1161, 1190, 1219, 1248, 1277, 1306, 1335, 1364, 1393, 1422
Offset: 0

Views

Author

Karl V. Keller, Jr., Oct 08 2014

Keywords

Comments

Numbers congruent to 1 mod 29.
Both A141977 and A059256 give the primes in this sequence.

Examples

			For n = 5, 29n + 1 = 145 + 1 = 146.
		

Crossrefs

Cf. A141977 (Primes congruent to 1 mod 29).
Cf. A059256 (Primes p such that x^29 = 2 has no solution mod p).
Cf. A195819 (multiples of 29).

Programs

  • GAP
    List([0..60], n-> 29*n+1); # G. C. Greubel, May 24 2019
  • Magma
    [29*n+1: n in [0..60]]; // Vincenzo Librandi, Oct 26 2014
    
  • Mathematica
    29Range[0, 60] + 1 (* Alonso del Arte, Oct 09 2014 *)
    CoefficientList[Series[(1+28x)/(1-x)^2, {x, 0, 60}], x] (* Vincenzo Librandi, Oct 26 2014 *)
    LinearRecurrence[{2,-1},{1,30},50] (* Harvey P. Dale, Oct 08 2019 *)
  • PARI
    vector(60, n, n--; 29*n+1) \\ Derek Orr, Oct 08 2014
    
  • Python
    for n in range(61):
        print(29*n+1, end=', ')
    
  • Sage
    [29*n+1 for n in (0..60)] # G. C. Greubel, May 24 2019
    

Formula

a(n) = 29*n + 1.
G.f.: (1+28*x)/(1-x)^2. - Vincenzo Librandi, Oct 26 2014 [corrected by Georg Fischer, May 24 2019]
E.g.f.: (1 + 29*x)*exp(x). - G. C. Greubel, May 24 2019

A256278 a(0)=1, a(1)=2, a(n) = 31*a(n-1) - 29*a(n-2).

Original entry on oeis.org

1, 2, 33, 965, 28958, 869713, 26121321, 784539274, 23563199185, 707707535789, 21255600833094, 638400107288033, 19173990901769297, 575880114843495250, 17296237823997043137, 519482849213446974997, 15602377428720941973934, 468608697663159238917041
Offset: 0

Views

Author

Karl V. Keller, Jr., Jun 02 2015

Keywords

Comments

The sequence A084330 is a(0)=0, a(1)=1, a(n)=31a(n-1)-29a(n-2), and the ratio A084330(n+1)/a(n) converges to phi^7 (~29.034441853748633...), where phi is the golden ratio (A001622).
The continued fraction for phi^7 is {29,{29}}, and 29 occurs in the following approximations for n*phi^7: A248786 (29*n+floor(n/29)+0^n-0^(n mod 29)) for A004922 (floor(n*phi^7)), A249079 (29*n+floor(n/29)+0^(1-floor((14+(n mod 29))/29))) for A004942 (round(n*phi^7)), and A248739 (29*n+ceiling(n/29)) for A004962 (ceiling(n*phi^7)).

Examples

			For n=3, 31*a(2)-29*a(1) = 31*(33)-29*(2) = 1023-58 = 965.
		

Crossrefs

Programs

  • Magma
    I:=[1,2]; [n le 2 select I[n] else 31*Self(n-1)-29*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 03 2015
  • Maple
    a:= n-> (<<0|1>, <-29|31>>^n. <<1, 2>>)[1,1]:
    seq(a(n), n=0..23);  # Alois P. Heinz, Dec 22 2023
  • Mathematica
    LinearRecurrence[{31, -29}, {1, 2}, 50] (* or *) CoefficientList[Series[(1 - 29 x)/(29 x^2 - 31 x + 1), {x, 0, 33}], x] (* Vincenzo Librandi, Jun 03 2015 *)
  • Python
    print(1, end=', ')
    print(2, end=', ')
    an = [1,2]
    for n in range(2,26):
      print(31*an[n-1]-29*an[n-2], end=', ')
      an.append(31*an[n-1]-29*an[n-2])
    

Formula

G.f.: (1-29*x)/(29*x^2-31*x+1). - Vincenzo Librandi, Jun 03 2015
E.g.f.: exp(31*x/2)*(65*cosh(13*sqrt(5)*x/2) - 27*sqrt(5)*sinh(13*sqrt(5)*x/2))/65. - Stefano Spezia, Aug 31 2025
Showing 1-9 of 9 results.