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

A195605 a(n) = (4*n*(n+2)+(-1)^n+1)/2 + 1.

Original entry on oeis.org

2, 7, 18, 31, 50, 71, 98, 127, 162, 199, 242, 287, 338, 391, 450, 511, 578, 647, 722, 799, 882, 967, 1058, 1151, 1250, 1351, 1458, 1567, 1682, 1799, 1922, 2047, 2178, 2311, 2450, 2591, 2738, 2887, 3042, 3199, 3362, 3527, 3698, 3871, 4050, 4231, 4418, 4607, 4802
Offset: 0

Views

Author

Bruno Berselli, Sep 21 2011 - based on remarks and sequences by Omar E. Pol

Keywords

Comments

Sequence found by reading the numbers in increasing order on the vertical line containing 2 of the square spiral whose vertices are the triangular numbers (A000217) - see Pol's comments in other sequences visible in this numerical spiral.
Also A077591 (without first term) and A157914 interleaved.

Crossrefs

Cf. A047621 (contains first differences), A016754 (contains the sum of any two consecutive terms).

Programs

  • Magma
    [(4*n*(n+2)+(-1)^n+3)/2: n in [0..48]];
    
  • Mathematica
    CoefficientList[Series[(2 + 3 x + 4 x^2 - x^3) / ((1 + x) (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 19 2013 *)
    LinearRecurrence[{2,0,-2,1},{2,7,18,31},50] (* Harvey P. Dale, Jan 21 2017 *)
  • PARI
    for(n=0, 48, print1((4*n*(n+2)+(-1)^n+3)/2", "));

Formula

G.f.: (2+3*x+4*x^2-x^3)/((1+x)*(1-x)^3).
a(n) = a(-n-2) = 2*a(n-1)-2*a(n-3)+a(n-4).
a(n) = A047524(A000982(n+1)).
Sum_{n>=0} 1/a(n) = 1/2 + Pi^2/16 - cot(Pi/(2*sqrt(2)))*Pi/(4*sqrt(2)). - Amiram Eldar, Mar 06 2023

A185869 (Odd,even)-polka dot array in the natural number array A000027; read by antidiagonals.

Original entry on oeis.org

2, 7, 9, 16, 18, 20, 29, 31, 33, 35, 46, 48, 50, 52, 54, 67, 69, 71, 73, 75, 77, 92, 94, 96, 98, 100, 102, 104, 121, 123, 125, 127, 129, 131, 133, 135, 154, 156, 158, 160, 162, 164, 166, 168, 170, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 277, 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, 299, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 379, 381, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

This is the second of four polka dot arrays; see A185868.
row 1: A130883;
row 2: A100037;
row 3: A100038;
row 4: A100039;
col 1: A014107;
col 2: A033537;
col 3: A100040;
col 4: A100041;
diag (2,18,...): A077591;
diag (7,31,...): A157914;
diag (16,48,...): A035008;
diag (29,69,...): A108928;
antidiagonal sums: A033431;
antidiagonal sums: 2*(1^3, 2^3, 3^3, 4^3,...) = 2*A000578.
A060432(n) + n is odd if and only if n is in this sequence. - Peter Kagey, Feb 03 2016

Examples

			Northwest corner:
  2....7....16...29...46
  9....18...31...48...69
  20...33...50...71...96
  35...52...73...98...127
		

Crossrefs

Cf. A000027 (as an array), A060432, A185868, A185870, A185871.

Programs

  • Haskell
    a185869 n = a185869_list !! (n - 1)
    a185869_list = scanl (+) 2 $ a' 1
      where  a' n = 2 * n + 3 : replicate n 2 ++ a' (n + 1)
    -- Peter Kagey, Sep 02 2016
    
  • Mathematica
    f[n_,k_]:=2n-1+(2n+2k-3)(n+k-1);
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
  • Python
    from math import isqrt, comb
    def A185869(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        x = n-comb(a,2)
        y = a-x+1
        return y*((y+(c:=x<<1)<<1)-5)+x*(c-3)+2 # Chai Wah Wu, Jun 18 2025

Formula

T(n,k) = 2n-1+(n+k-1)*(2n+2k-3), k>=1, n>=1.

A185438 a(n) = 8*n^2 - 2*n + 1.

Original entry on oeis.org

1, 7, 29, 67, 121, 191, 277, 379, 497, 631, 781, 947, 1129, 1327, 1541, 1771, 2017, 2279, 2557, 2851, 3161, 3487, 3829, 4187, 4561, 4951, 5357, 5779, 6217, 6671, 7141, 7627, 8129, 8647, 9181, 9731, 10297, 10879, 11477, 12091, 12721, 13367, 14029, 14707, 15401, 16111, 16837, 17579
Offset: 0

Views

Author

Paul Curtz, Feb 03 2011

Keywords

Comments

Odd numbers (A005408) written clockwise as a square spiral:
.
41--43--45--47--49--51
| |
39 13--15--17--19 53
| | | |
37 11 1---3 21 55
| | | | |
35 9---7---5 23 57
| | |
33--31--29--27--25 59
|
71--69--67--65--63--61
.
Walking in straight lines away from the center:
1, 17, 49, ... = A069129(n+1) = 1 - 8*n + 8*n^2,
1, 3, 21, ... = A033567(n) = 1 - 6*n + 8*n^2,
1, 15, 45, ... = A014634(n) = 1 + 6*n + 8*n^2,
1, 5, 25, ... = A080856(n) = 1 - 4*n + 8*n^2,
1, 13, 41, ... = A102083(n) = 1 + 4*n + 8*n^2,
1, 7, 29, ... = a(n) = 1 - 2*n + 8*n^2,
1, 11, 37, ... = A188135(n) = 1 + 2*n + 8*n^2,
1, 9, 33, ... = A081585(n) = 1 + 8*n^2,
5, 29, 69, ... = A108928(n+1) = -3 + 8*n^2,
7, 31, 71, ... = A157914(n+1) = -1 + 8*n^2,
9, 35, 77, ... = A033566(n+1) = -1 + 2*n + 8*n^2.
All are quadrisections of sequences in A181407(n) (example: A014634(n) and A033567(n) in A064038(n+1)) or of this family (?): a(n) is a quadrisection of f(n) = 1,1,1,1,2,7,11,8,11,29,37,23,28,67,79,46,... f(n) is just before A064038(n+1) (fifth vertical) in A181407(n). The companion to a(n) is A188135(n), another quadrisection of f(n). Two last quadrisections of f(n) are A054552(n) and A033951(n).
For n >= 1, bisection of A193867. - Omar E. Pol, Aug 16 2011
Also the sequence may be obtained by starting with the segment (1, 7) followed by the line from 7 in the direction 7, 29, ... in the square spiral whose vertices are the generalized hexagonal numbers (A000217). - Omar E. Pol, Aug 01 2016

Crossrefs

Programs

Formula

a(n) = a(n-1) + 16*n - 10 (n > 0).
a(n) = 2*a(n-1) - a(n-2) + 16 (n > 1).
a(n) = 3*(n-1) - 3*a(n-2) + a(n-3) (n > 2).
G.f.: (-1 - 4*x - 11*x^2)/(x-1)^3. - R. J. Mathar, Feb 03 2011
a(n) = A014635(n) + 1. - Bruno Berselli, Apr 09 2011
E.g.f.: exp(x)*(1 + 6*x + 8*x^2). - Elmo R. Oliveira, Nov 17 2024

A158443 a(n) = 16*n^2 - 4.

Original entry on oeis.org

12, 60, 140, 252, 396, 572, 780, 1020, 1292, 1596, 1932, 2300, 2700, 3132, 3596, 4092, 4620, 5180, 5772, 6396, 7052, 7740, 8460, 9212, 9996, 10812, 11660, 12540, 13452, 14396, 15372, 16380, 17420, 18492, 19596, 20732, 21900, 23100, 24332, 25596, 26892, 28220, 29580
Offset: 1

Views

Author

Vincenzo Librandi, Mar 19 2009

Keywords

Comments

The identity (8*n^2 - 1)^2 - (16*n^2 - 4) *(2*n)^2 = 1 can be written as A157914(n)^2 - a(n)*A005843(n)^2 = 1.
Sequence found by reading the line from 12, in the direction 12, 60, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Programs

  • Magma
    I:=[12, 60, 140]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]];
    
  • Mathematica
    16Range[60]^2-4  (* Harvey P. Dale, Mar 18 2011 *)
  • PARI
    a(n) = 16*n^2 - 4.

Formula

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f: 4*x*(3+6*x-x^2)/(1-x)^3.
From Amiram Eldar, Mar 05 2023: (Start)
Sum_{n>=1} 1/a(n) = 1/8.
Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi-2)/16. (End)
From Elmo R. Oliveira, Jan 16 2025: (Start)
E.g.f.: 4*(exp(x)*(4*x^2 + 4*x - 1) + 1).
a(n) = 4*A000466(n). (End)

A157913 a(n) = 64*n^2 - 16.

Original entry on oeis.org

48, 240, 560, 1008, 1584, 2288, 3120, 4080, 5168, 6384, 7728, 9200, 10800, 12528, 14384, 16368, 18480, 20720, 23088, 25584, 28208, 30960, 33840, 36848, 39984, 43248, 46640, 50160, 53808, 57584, 61488, 65520, 69680, 73968, 78384, 82928, 87600, 92400, 97328, 102384
Offset: 1

Views

Author

Vincenzo Librandi, Mar 09 2009

Keywords

Comments

The identity (8*n^2 - 1)^2 - (64*n^2 - 16)*n^2 = 1 can be written as A157914(n)^2 - a(n)*n^2 = 1. - Vincenzo Librandi, Feb 09 2012

Crossrefs

Programs

  • Magma
    I:=[48, 240, 560]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 09 2012
    
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {48, 240, 560}, 50] (* Vincenzo Librandi, Feb 09 2012 *)
    64*Range[40]^2-16 (* Harvey P. Dale, Jul 27 2012 *)
  • PARI
    for(n=1, 40, print1(64*n^2 - 16", ")); \\ Vincenzo Librandi, Feb 09 2012

Formula

From Vincenzo Librandi, Feb 09 2012: (Start)
G.f.: -16*x*(3 + 6*x - x^2)/(x - 1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 07 2023: (Start)
Sum_{n>=1} 1/a(n) = 1/32.
Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi-2)/64. (End)
From Elmo R. Oliveira, Jan 16 2025: (Start)
E.g.f.: 16*(exp(x)*(4*x^2 + 4*x - 1) + 1).
a(n) = 16*A000466(n). (End)

A158487 a(n) = 64*n^2 - 8.

Original entry on oeis.org

56, 248, 568, 1016, 1592, 2296, 3128, 4088, 5176, 6392, 7736, 9208, 10808, 12536, 14392, 16376, 18488, 20728, 23096, 25592, 28216, 30968, 33848, 36856, 39992, 43256, 46648, 50168, 53816, 57592, 61496, 65528, 69688, 73976, 78392, 82936, 87608, 92408, 97336, 102392
Offset: 1

Views

Author

Vincenzo Librandi, Mar 20 2009

Keywords

Comments

The identity (16*n^2 - 1)^2 - (64*n^2 - 8)*(2*n)^2 = 1 can be written as A141759(n)^2 - a(n)*A005843(n)^2 = 1. - Vincenzo Librandi, Feb 09 2012

Crossrefs

Programs

  • Magma
    I:=[56, 248, 568]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 09 2012
    
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {56, 248, 568}, 50] (* Vincenzo Librandi, Feb 09 2012 *)
  • PARI
    for(n=1, 40, print1(64*n^2 - 8", ")); \\ Vincenzo Librandi, Feb 09 2012

Formula

From Vincenzo Librandi, Feb 09 2012: (Start)
G.f.: -8*x*(7 + 10*x - x^2)/(x - 1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 05 2023: (Start)
Sum_{n>=1} 1/a(n) = (1 - cot(Pi/(2*sqrt(2)))*Pi/(2*sqrt(2)))/16.
Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/(2*sqrt(2)))*Pi/(2*sqrt(2)) - 1)/16. (End)
From Elmo R. Oliveira, Jan 16 2025: (Start)
E.g.f.: 8*(exp(x)*(8*x^2 + 8*x - 1) + 1).
a(n) = 8*A157914(n). (End)

A320431 The number of tiles inside a regular n-gon created by lines that run from each of the vertices of the n edges orthogonal to these edges.

Original entry on oeis.org

1, 1, 31, 13, 71, 25, 127, 41, 199, 61, 287, 85, 391, 113, 511, 145, 647, 181, 799, 221, 967, 265, 1151, 313, 1351, 365, 1567, 421, 1799, 481, 2047, 545, 2311, 613, 2591, 685, 2887, 761, 3199, 841, 3527, 925, 3871, 1013, 4231, 1105, 4607, 1201, 4999, 1301, 5407, 1405, 5831, 1513, 6271, 1625, 6727, 1741
Offset: 3

Views

Author

R. J. Mathar, Jan 08 2019

Keywords

Comments

Sequence proposed by Thomas Young: draw the regular n-gon and construct 2*n lines that run from both ends of the n edges perpendicular into the n-gon until they hit an opposite edge. (For n even the lines actually hit another vertex, so there are only n additional lines). a(n) is the number of non-overlapping tiles inside the n-gon with edges that are sections of the lines or n-gon edges.

Crossrefs

Formula

a(2n) = 2*n^2+2*n+1 = A001844(n), n>1. a(2n+1) = 8*n^2-1 = A157914(n), n>1. - Thomas Young (tyoung(AT)district16.org), Nov 11 2017
G.f.: x^3 +x^4 -x^5*(31+13*x-22*x^2-14*x^3+7*x^4+5*x^5) / ( (x-1)^3*(1+x)^3 ). - R. J. Mathar, Jan 21 2019
a(n) = 1+n*A064680(n-2), n>=5. - R. J. Mathar, Jan 21 2019

A342873 Numbers whose distance to the nearest cube equals the distance to the nearest product of 3 consecutive integers (three-dimensional oblong).

Original entry on oeis.org

0, 7, 16, 62, 92, 213, 276, 508, 616, 995, 1160, 1722, 1956, 2737, 3052, 4088, 4496, 5823, 6336, 7990, 8620, 10637, 11396, 13812, 14712, 17563, 18616, 21938, 23156, 26985, 28380, 32752, 34336, 39287, 41072, 46638, 48636, 54853, 57076, 63980, 66440, 74067
Offset: 1

Views

Author

Lamine Ngom, Mar 28 2021

Keywords

Comments

That is, numbers k such that A074989(k) = A342872(k).
They form 2 partitions:
7, 62, 213, ... = 8*k^3 - k = k*A157914(k).
0, 16, 92, ... = 8*k^3 + 6*k^2 + 2*k = 2*k*A033951(k).

Crossrefs

Programs

  • Python
    def aupto(limit):
      cubes = [k**3 for k in range(int((limit+1)**1/3)+2)]
      proms = [k*(k+1)*(k+2) for k in range(int((limit+1)**1/3)+1)]
      A074989 = [min(abs(n-c) for c in cubes) for n in range(limit+1)]
      A342872 = [min(abs(n-p) for p in proms) for n in range(limit+1)]
      return [m for m in range(limit+1) if A074989[m] == A342872[m]]
    print(aupto(10**4)) # Michael S. Branicky, Mar 28 2021
Showing 1-8 of 8 results.