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.

User: Avi Friedlich

Avi Friedlich's wiki page.

Avi Friedlich has authored 10 sequences.

A258133 Expansion of tri-digit zeros interlaced with an arithmetic progression of positive and negative numbers.

Original entry on oeis.org

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

Author

Avi Friedlich, May 21 2015

Keywords

Comments

This sequence is observed as the second difference in the expansion of 1/((1-x)*(1-x^2)*(1-x^3)*(1-x^6)) (A029000), a sequence noted for its interlaced and structural coordination numbers.

Examples

			G.f. = 1 + 2*x^4 - 2*x^5 + 2*x^6 + 3*x^10 - 3*x^11 + 3*x^12 + 4*x^16 + ...
		

Programs

  • Mathematica
    a[ n_] := With[ {m=n-1}, If[ OddQ[ Quotient[ m, 3]], Quotient[ m+9, 6] (-1)^Mod[m, 3], 0]]; (* Michael Somos, Jun 07 2015 *)
  • PARI
    Vec((x^9-x^7-x^6+x^4-x^3+x+1)/((x-1)^2*(x+1)^2*(x^2-x+1)*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, May 24 2015
    
  • PARI
    {a(n) = n--; if(n\3%2, (n+9)\6 * (-1)^(n%3), 0)}; /* Michael Somos, Jun 07 2015 */

Formula

a(n) = -a(n-1) + a(n-3) + a(n-4) + a(n-6) + a(n-7) - a(n-9) - a(n-10). a(6*k-2) = -a(6*k-1) = a(6*k) = k+1 for k >= 1.
G.f.: (x^9-x^7-x^6+x^4-x^3+x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)*(x^2+x+1)^2). - Colin Barker, May 24 2015
a(n) = -a(-14-n) for all n in Z. - Michael Somos, Jun 07 2015

A256376 Primes of the form 10n^2 - 90n + 163.

Original entry on oeis.org

23, 83, 163, 263, 383, 523, 683, 863, 1063, 1283, 1523, 1783, 2063, 2683, 3023, 4583, 5023, 5483, 6983, 7523, 8663, 9883, 11863, 14783, 16363, 17183, 19763, 20663, 25463, 29663, 30763, 31883, 33023, 34183, 35363, 36563, 37783, 39023, 40283, 42863, 45523, 49663, 56963, 61583, 64763
Offset: 1

Author

Avi Friedlich, Mar 27 2015

Keywords

Programs

  • Magma
    [ a: k in [7..200] | IsPrime(a) where a is 10*k^2-90*k+163];
    
  • Mathematica
    Select[Table[10 k^2 - 90 k + 163, {k, 7, 600}], PrimeQ]
  • PARI
    select(isprime, vector(100,n,10*n^2 + 30*n - 17)) \\ Charles R Greathouse IV, Mar 27 2015

Extensions

Corrected by Vincenzo Librandi, Mar 27 2015

A256374 Primes of the form 7*k^2 + 7*k + 17.

Original entry on oeis.org

17, 31, 59, 101, 157, 227, 311, 409, 521, 647, 787, 941, 1109, 1291, 1487, 1697, 2411, 2677, 2957, 3251, 3559, 3881, 4217, 4567, 4931, 5309, 5701, 6961, 8837, 9341, 9859, 10391, 10937, 11497, 12071, 12659, 13877, 15809, 16481, 17167, 19309, 20051, 20807, 21577, 23159, 23971
Offset: 1

Author

Avi Friedlich, Mar 26 2015

Keywords

Comments

The values k=0 through 15 all give primes.

Examples

			For k=15 we get 1697, a prime.
For k=16 we get 1921 = 17*113, not a prime, so not a term of the sequence.
		

Crossrefs

Cf. A256375.

Programs

  • Magma
    [ a: n in [0..200] | IsPrime(a) where a is 7*n^2 + 7*n + 17 ];
    
  • Mathematica
    Select[Table[7 n^2 + 7 n +17, {n, 0, 600}], PrimeQ]
  • PARI
    for(k=0, 1e2, if(ispseudoprime(7*k^2+7*k+17), print1(7*k^2+7*k+17, ", "))) \\ Felix Fröhlich, Apr 01 2015

Extensions

Corrected by Vincenzo Librandi, Mar 27 2015
Edited by N. J. A. Sloane, Mar 27 2015

A255847 a(n) = 2*n^2 + 16.

Original entry on oeis.org

16, 18, 24, 34, 48, 66, 88, 114, 144, 178, 216, 258, 304, 354, 408, 466, 528, 594, 664, 738, 816, 898, 984, 1074, 1168, 1266, 1368, 1474, 1584, 1698, 1816, 1938, 2064, 2194, 2328, 2466, 2608, 2754, 2904, 3058, 3216, 3378, 3544, 3714, 3888, 4066, 4248, 4434, 4624
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=8 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 32 is a square.

Crossrefs

Cf. A189833.
Subsequence of A047467.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+16: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 16, {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{16,18,24},50] (* Harvey P. Dale, Nov 11 2017 *)
  • PARI
    vector(50, n, n--; 2*n^2+16)
    
  • Sage
    [2*n^2+16 for n in (0..50)]
    

Formula

G.f.: 2*(8 - 15*x + 9*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A189833(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + 2*sqrt(2)*Pi*coth(2*sqrt(2)*Pi))/32.
Sum_{n>=0} (-1)^n/a(n) = (1 + 2*sqrt(2)*Pi*cosech(2*sqrt(2)*Pi))/32. (End)
E.g.f.: 2*exp(x)*(8 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Edited by Bruno Berselli, Mar 13 2015

A255846 a(n) = 2*n^2 + 14.

Original entry on oeis.org

14, 16, 22, 32, 46, 64, 86, 112, 142, 176, 214, 256, 302, 352, 406, 464, 526, 592, 662, 736, 814, 896, 982, 1072, 1166, 1264, 1366, 1472, 1582, 1696, 1814, 1936, 2062, 2192, 2326, 2464, 2606, 2752, 2902, 3056, 3214, 3376, 3542, 3712, 3886, 4064, 4246, 4432
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=7 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 28 is a square.

Crossrefs

Cf. A117619.
Subsequence of A047235 and A047451.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+14: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 14, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+14)
    
  • Sage
    [2*n^2+14 for n in (0..50)]
    

Formula

G.f.: 2*(7 - 13*x + 8*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A117619(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(7)*Pi*coth(sqrt(7)*Pi))/28.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(7)*Pi*cosech(sqrt(7)*Pi))/28. (End)
E.g.f.: 2*exp(x)*(7 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Edited by Bruno Berselli, Mar 13 2015

A255843 a(n) = 2*n^2 + 4.

Original entry on oeis.org

4, 6, 12, 22, 36, 54, 76, 102, 132, 166, 204, 246, 292, 342, 396, 454, 516, 582, 652, 726, 804, 886, 972, 1062, 1156, 1254, 1356, 1462, 1572, 1686, 1804, 1926, 2052, 2182, 2316, 2454, 2596, 2742, 2892, 3046, 3204, 3366, 3532, 3702, 3876, 4054, 4236, 4422
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=2 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 8 is a square.

Crossrefs

Cf. A059100.
Cf. unsigned A147973: numbers of the form 2*m^2-4.
Cf. sequences of the form 2*m^2+2*k: A005893 (k=1), this sequence (k=2), A255844 (k=3), A155966 (k=4), A255845 (k=5), A255842 (k=6), A255846 (k=7), A255847 (k=8), A255848 (k=9).

Programs

  • Magma
    [2*n^2+4: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 4, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+4)
    
  • Sage
    [2*n^2+4 for n in (0..50)]
    

Formula

G.f.: 2*(2 - 3*x + 3*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A059100(n).
a(n) = a(n-1) + 4n - 2. - Bob Selcoe, Mar 25 2020
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(2)*Pi*coth(sqrt(2)*Pi))/8.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(2)*Pi*cosech(sqrt(2)*Pi))/8. (End)
E.g.f.: 2*exp(x)*(2 + x + x^2). - Stefano Spezia, Aug 07 2024

Extensions

Edited by Bruno Berselli, Mar 13 2015

A255845 a(n) = 2*n^2 + 10.

Original entry on oeis.org

10, 12, 18, 28, 42, 60, 82, 108, 138, 172, 210, 252, 298, 348, 402, 460, 522, 588, 658, 732, 810, 892, 978, 1068, 1162, 1260, 1362, 1468, 1578, 1692, 1810, 1932, 2058, 2188, 2322, 2460, 2602, 2748, 2898, 3052, 3210, 3372, 3538, 3708, 3882, 4060, 4242, 4428
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=5 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 20 is a square.

Crossrefs

Cf. A016825 (first differences), A117951.
Subsequence of A047463.
Cf. similar sequences listed in A255843.

Programs

Formula

a(n) = 2*A117951(n).
From Vincenzo Librandi, Mar 08 2015: (Start)
G.f.: 2*(5 - 9*x + 6*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(5)*Pi*coth(sqrt(5)*Pi))/20.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(5)*Pi*cosech(sqrt(5)*Pi))/20. (End)
E.g.f.: 2*exp(x)*(5 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Edited by Bruno Berselli, Mar 13 2015

A255844 a(n) = 2*n^2 + 6.

Original entry on oeis.org

6, 8, 14, 24, 38, 56, 78, 104, 134, 168, 206, 248, 294, 344, 398, 456, 518, 584, 654, 728, 806, 888, 974, 1064, 1158, 1256, 1358, 1464, 1574, 1688, 1806, 1928, 2054, 2184, 2318, 2456, 2598, 2744, 2894, 3048, 3206, 3368, 3534, 3704, 3878, 4056, 4238, 4424, 4614
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=3 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2. Also, it is noted that a(n)*n = (n + 1)^3 + (n - 1)^3.
Equivalently, numbers m such that 2*m-12 is a square.
For n = 0..16, 3*a(n)-1 is prime (see A087370); for n = 0..12, 3*a(n)-5 is prime (see A107303).

Crossrefs

Cf. A016825 (first differences), A087370, A107303, A114949, A117950.
Cf. A152811: nonnegative numbers of the form 2*m^2-6.
Subsequence of A000378.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+6: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 6, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+6)
    
  • Sage
    [2*n^2+6 for n in (0..50)]
    

Formula

G.f.: 2*(3-5*x+4*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A117950(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(3)*Pi*coth(sqrt(3)*Pi))/12.
Sum_{n>=0} (-1)^n/a(n) = (1 + (sqrt(3)*Pi)*cosech(sqrt(3)*Pi))/12. (End)
E.g.f.: 2*exp(x)*(3 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Corrected and extended by Bruno Berselli, Mar 11 2015

A255842 a(n) = 2*n^2 + 12.

Original entry on oeis.org

12, 14, 20, 30, 44, 62, 84, 110, 140, 174, 212, 254, 300, 350, 404, 462, 524, 590, 660, 734, 812, 894, 980, 1070, 1164, 1262, 1364, 1470, 1580, 1694, 1812, 1934, 2060, 2190, 2324, 2462, 2604, 2750, 2900, 3054, 3212, 3374, 3540, 3710, 3884, 4062, 4244, 4430
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=6 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2. Also, it is noted that a(n)*n = (n + sqrt(2))^3 + (n - sqrt(2))^3.
Equivalently, numbers m such that 2*m - 24 is a square.
For n = 0..10, a(n) - 1 is prime (see A092968).

Crossrefs

Cf. A016825 (first differences), A092968, A114949.
Subsequence of A047238 and A047406.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+12: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 12, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+12)
    
  • Sage
    [2*n^2+12 for n in (0..50)]
    

Formula

G.f.: 2*(6 - 11*x + 7*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A114949(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(6)*Pi*coth(sqrt(6)*Pi))/24.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(6)*Pi*cosech(sqrt(6)*Pi))/24. (End)
E.g.f.: 2*exp(x)*(6 + x + x^2). - Elmo R. Oliveira, Jan 24 2025

Extensions

Edited by Bruno Berselli, Mar 11 2015

A255848 a(n) = 2*n^2 + 18.

Original entry on oeis.org

18, 20, 26, 36, 50, 68, 90, 116, 146, 180, 218, 260, 306, 356, 410, 468, 530, 596, 666, 740, 818, 900, 986, 1076, 1170, 1268, 1370, 1476, 1586, 1700, 1818, 1940, 2066, 2196, 2330, 2468, 2610, 2756, 2906, 3060, 3218, 3380, 3546, 3716, 3890, 4068, 4250, 4436
Offset: 0

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

For n>3, the sequence gives the 6th diagonal of triangle in A055096.
Also, this is the case k=9 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2. It is noted that a(n)*n = (n + sqrt(3))^3 + (n - sqrt(3))^3.
Equivalently, numbers m such that 2*m-36 is a square.

Crossrefs

Cf. A016825 (first differences), A055096, A189834.
Subsequence of A047463.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+18: n in [0..50]]; // Vincenzo Librandi, Mar 08 2015
    
  • Mathematica
    f[n_] := 2 n^2 + 18; Array[f, 50, 0] (* Robert G. Wilson v, Mar 08 2015 *)
    CoefficientList[Series[(18 - 34 x + 20 x^2) / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 08 2015 *)
    LinearRecurrence[{3,-3,1},{18,20,26},50] (* Harvey P. Dale, Aug 20 2021 *)
  • PARI
    vector(50, n, 2*n^2+18) \\ Derek Orr, Mar 09 2015
    
  • Sage
    [2*n^2+18 for n in (0..50)] # Bruno Berselli, Mar 11 2015

Formula

a(n) = 2*A189834(n).
From Vincenzo Librandi, Mar 08 2015: (Start)
G.f.: 2*(9 - 17*x + 10*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + 3*Pi*coth(3*Pi))/36.
Sum_{n>=0} (-1)^n/a(n) = (1 + 3*Pi*cosech(3*Pi))/36. (End)
E.g.f.: 2*exp(x)*(9 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Edited by Bruno Berselli, Mar 11 2015