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 14 results. Next

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

A252983 T(n,k)=Number of nXk nonnegative integer arrays with upper left 0 and lower right its king-move distance away minus 2 and every value increasing by 0 or 1 with every step right, diagonally se or down.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 3, 1, 1, 3, 6, 13, 1, 13, 6, 10, 41, 33, 33, 41, 10, 15, 85, 266, 68, 266, 85, 15, 21, 145, 851, 1247, 1247, 851, 145, 21, 28, 221, 1836, 8487, 4657, 8487, 1836, 221, 28, 36, 313, 3221, 27905, 67537, 67537, 27905, 3221, 313, 36, 45, 421, 5006, 62977
Offset: 1

Views

Author

R. H. Hardin, Dec 25 2014

Keywords

Comments

Table starts
..0...0....1......3.......6........10..........15............21.............28
..0...0....1.....13......41........85.........145...........221............313
..1...1....1.....33.....266.......851........1836..........3221...........5006
..3..13...33.....68....1247......8487.......27905.........62977.........114433
..6..41..266...1247....4657.....67537......433401.......1481460........3510600
.10..85..851...8487...67537....432842.....5672484......36112108......129234988
.15.145.1836..27905..433401...5672484....60650883.....766674140.....4970634131
.21.221.3221..62977.1481460..36112108...766674140...13458882036...170090480091
.28.313.5006.114433.3510600.129234988..4970634131..170090480091..4857082197177
.36.421.7191.182273.6637020.322183180.18692194423.1139074556531.62656851440792

Examples

			Some solutions for n=4 k=4
..0..0..1..1....0..0..0..0....0..0..0..1....0..0..0..0....0..0..1..1
..0..1..1..1....0..0..0..0....0..0..0..1....0..0..0..1....0..1..1..1
..0..1..1..1....0..0..1..1....0..0..0..1....0..0..1..1....1..1..1..1
..0..1..1..1....0..1..1..1....0..0..1..1....0..0..1..1....1..1..1..1
		

Crossrefs

Column 1 is A000217(n-2)
Column 2 is A102083(n-3)

Formula

Empirical for column k:
k=1: a(n) = (1/2)*n^2 - (3/2)*n + 1
k=2: a(n) = 8*n^2 - 44*n + 61 for n>2
k=3: a(n) = 200*n^2 - 1615*n + 3341 for n>4
k=4: a(n) = 8192*n^2 - 87808*n + 241153 for n>6
k=5: a(n) = 557568*n^2 - 7467372*n + 25553940 for n>8
k=6: a(n) = 63438848*n^2 - 1019729920*n + 4176308004 for n>10
k=7: a(n) = 12103190528*n^2 - 226960984822*n + 1081747760523 for n>12

A185868 (Odd,odd)-polka dot array in the natural number array A000027, by antidiagonals.

Original entry on oeis.org

1, 4, 6, 11, 13, 15, 22, 24, 26, 28, 37, 39, 41, 43, 45, 56, 58, 60, 62, 64, 66, 79, 81, 83, 85, 87, 89, 91, 106, 108, 110, 112, 114, 116, 118, 120, 137, 139, 141, 143, 145, 147, 149, 151, 153, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, 325, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

This is one of four polka dot arrays in the natural number array A000027:
(odd,odd): A185868
(odd,even): A185869
(even,odd): A185870
(even,even): A185871
row 1: A084849
col 1: A000384
col 2: A091823
diag (1,13,...): A102083
diag (4,24,...): A085250
antidiagonal sums: A059722

Examples

			The natural number array A000027 has northwest corner
  1...2...4...7...11
  3...5...8...12..17
  6...9...13..18..24
  10..14..19..25..32
  15..20..26..33..41
The numbers in (odd,odd) positions comprise A185868:
  1....4....11...22...37
  6....13...24...39...58
  15...26...41...60...83
  28...43...62...85...112
		

Crossrefs

Cf. A000027 (as an array), A185872, A185869, A185870, A185871.

Programs

  • Mathematica
    f[n_,k_]:=2n-1+(n+k-2)(2n+2k-3);
    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 A185868(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)-7)+x*(c-5)+5 # Chai Wah Wu, Jun 18 2025

Formula

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

A360418 Numbers k such that, in a listing of all congruence classes of positive integers, the k-th congruence class contains k. Here the class r mod m (with r in {1,...,m}) precedes the class a' mod b' (with r' in {1,...,m'}) iff m < m' or r > r'.

Original entry on oeis.org

1, 2, 3, 5, 13, 17, 20, 25, 41, 48, 53, 61, 85, 95, 102, 113, 145, 158, 167, 181, 221, 237, 248, 265, 313, 332, 345, 365, 421, 443, 458, 481, 545, 570, 587, 613, 685, 713, 732, 761, 841, 872, 893, 925, 1013, 1047, 1070, 1105, 1201, 1238, 1263, 1301, 1405, 1445, 1472, 1513, 1625, 1668, 1697, 1741, 1861
Offset: 1

Views

Author

James Propp, Feb 06 2023

Keywords

Comments

The sequence appears to be the interleaving of the four sequences A080856, A102083, A360416, A360417. This has been verified for values of k up to one million as of February 06 2023.
Above conjecture confirmed with more terms and linear recurrence. See supporting formula below. - Ray Chandler, Feb 10 2025

Examples

			The 1st congruence class in the list (with m=1 and r=1) is {1,2,3,...} which contains 1, so 1 is in the sequence. The 2nd congruence class (with m=2 and r=2) is {2,4,6,...} which contains 2, so 2 is in the sequence. The 3rd congruence class (with m=2 and r=1) is {1,3,5,...} which contains 3, so 3 is in the sequence. The 4th congruence class (with m=3 and r=3) is {3,6,9,...} which does not contain 4, so 4 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    mval[n_] := Floor[Sqrt[2 n] + 1/2]; (* A002024 *)
    rval[n_] := (2 - 2 n + Round[Sqrt[2 n]] + Round[Sqrt[2 n]]^2)/2; (* A004736 *)
    test[n_] := Mod[n - rval[n], mval[n]] == 0;
    Select[Range[10000], test[#] &]

Formula

From Ray Chandler, Feb 10 2025: (Start)
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n > 8.
A080856(n) = A360417(n-1) + 2*A080856(n-1) - 2*A360417(n-2) - A080856(n-2) + A360417(n-3).
A102083(n) = A080856(n) + 2*A102083(n-1) - 2*A080856(n-1) - A102083(n-2) + A080856(n-2).
A360416(n) = A102083(n) + 2*A360416(n-1) - 2*A102083(n-1) - A360416(n-2) + A102083(n-2).
A360417(n) = A360416(n) + 2*A360417(n-1) - 2*A360416(n-1) - A360417(n-2) + A360416(n-2). (End)

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

A195241 Expansion of (1-x+19*x^3-3*x^4)/(1-x)^3.

Original entry on oeis.org

1, 2, 3, 23, 59, 111, 179, 263, 363, 479, 611, 759, 923, 1103, 1299, 1511, 1739, 1983, 2243, 2519, 2811, 3119, 3443, 3783, 4139, 4511, 4899, 5303, 5723, 6159, 6611, 7079, 7563, 8063, 8579, 9111, 9659, 10223, 10803, 11399, 12011, 12639, 13283, 13943
Offset: 0

Views

Author

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

Keywords

Comments

Sequence found by reading the line 1, 2, 3, 23,.. in the square spiral whose vertices are the triangular numbers (A000217) - see Pol's comments in other sequences visible in this numerical spiral.
This is a subsequence of A110326 (without signs) and A047838 (apart from the second term, 2).

Crossrefs

Programs

  • Magma
    m:=44; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+19*x^3-3*x^4)/(1-x)^3));
    
  • Mathematica
    CoefficientList[Series[(1 - x + 19 x^3 - 3 x^4)/(1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2013 *)
    LinearRecurrence[{3,-3,1},{1,2,3,23,59},50] (* Harvey P. Dale, Dec 04 2022 *)
  • Maxima
    makelist(coeff(taylor((1-x+19*x^3-3*x^4)/(1-x)^3, x, 0, n), x, n), n, 0, 43);
  • PARI
    Vec((1-x+19*x^3-3*x^4)/(1-x)^3+O(x^44))
    

Formula

G.f.: (1-x+19*x^3-3*x^4)/(1-x)^3.
a(n) = 8*n^2-20*n+11 for n>1; a(0)=1, a(1)=2.

A337822 Permutation of the natural numbers formed by numbering an infinite square grid by a counterclockwise diamond spiral and visiting them by a counterclockwise stair step spiral.

Original entry on oeis.org

1, 2, 8, 3, 9, 20, 10, 21, 11, 4, 12, 5, 13, 14, 6, 15, 7, 16, 30, 17, 31, 18, 32, 19, 33, 52, 34, 53, 35, 54, 36, 55, 37, 22, 38, 23, 39, 24, 40, 25, 41, 42, 26, 43, 27, 44, 28, 45, 29, 46, 68, 47, 69, 48, 70, 49, 71, 50, 72, 51, 73, 100, 74, 101, 75, 102, 76
Offset: 1

Views

Author

Mohammed Yaseen, Sep 24 2020

Keywords

Examples

			The path begins:
.
               ---33
                   |
              34  19--32
                       |
          35  20---9  18--31  48
               |   |       |
      36  21--10   3---8  17--30  47
           |           |       |
  37  22  11---4   1---2   7--16  29  46
               |           |
      38  23  12---5   6--15  28  45
                   |   |
          39  24  13--14  27  44
.
              40  25  26  43
.
                  41  42
.
		

Crossrefs

Cf. A102083.
Diamond spiral coordinates (but 0-based): A010751, A305258.
Same type of visit on other types of spirals: A334619, A337838.

Formula

a(A102083(n)) = A102083(n) and a(A102083(n)+1) = A102083(n)+1.

A354595 a(n) = n^2 + 4*floor(n/2)^2.

Original entry on oeis.org

0, 1, 8, 13, 32, 41, 72, 85, 128, 145, 200, 221, 288, 313, 392, 421, 512, 545, 648, 685, 800, 841, 968, 1013, 1152, 1201, 1352, 1405, 1568, 1625, 1800, 1861, 2048, 2113, 2312, 2381, 2592, 2665, 2888, 2965, 3200, 3281, 3528, 3613, 3872
Offset: 0

Views

Author

David Lovler, Jun 01 2022

Keywords

Comments

The first bisection is A139098, the second bisection is A102083.

Crossrefs

Programs

  • Mathematica
    a[n_] := n^2 + 4 Floor[n/2]^2
    Table[a[n], {n, 0, 90}]    (* A354595 *)
    LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 8, 13, 32}, 60]
  • PARI
    a(n) = n^2 + 4*(n\2)^2;

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n >= 5.
a(n) = A000290(n) + 4*A008794(n).
G.f.: x*(1 + 7*x + 3*x^2 + 5*x^3)/((1 - x)^3*(1 + x)^2).
E.g.f.: 2*x^2*cosh(x) + (1 + 2*x + 2*x^2)*sinh(x). - Stefano Spezia, Jun 07 2022

A103776 Primes p such that 8*p^2 + 4*p + 1 is also prime.

Original entry on oeis.org

2, 7, 11, 17, 41, 61, 101, 167, 227, 257, 281, 337, 347, 367, 397, 401, 461, 467, 487, 541, 571, 587, 601, 631, 641, 647, 661, 691, 701, 761, 857, 947, 971, 977, 997, 1021, 1087, 1237, 1277, 1291, 1381, 1451, 1481, 1607, 1621, 1627, 1667, 1697, 1787, 1811
Offset: 1

Views

Author

Zak Seidov, Feb 15 2005

Keywords

Crossrefs

Cf. A102083.

Programs

  • Magma
    [n: n in [0..2000] | IsPrime(n) and IsPrime(8*n^2 + 4*n + 1)]; // Vincenzo Librandi, Feb 03 2014
  • Mathematica
    Select[Prime[Range[300]], PrimeQ[8 #^2 + 4 # + 1]&] (* Harvey P. Dale, Jan 04 2011 *)

A381555 Triangle read by rows T(n,k) is the number of diamond coverings for a specific number of diamonds covering an even length row of triangles.

Original entry on oeis.org

1, 4, 1, 8, 4, 1, 13, 16, 4, 1, 19, 41, 24, 4, 1, 26, 85, 85, 32, 4, 1, 34, 155, 231, 145, 40, 4, 1, 43, 259, 532, 489, 221, 48, 4, 1, 53, 406, 1092, 1365, 891, 313, 56, 4, 1, 64, 606, 2058, 3333, 2926, 1469, 421, 64, 4, 1, 76, 870, 3630, 7359, 8294, 5551, 2255, 545, 72, 4
Offset: 0

Views

Author

Craig Knecht, Feb 27 2025

Keywords

Comments

The total number of ways the diamond can cover a single row of length(n) triangles is the Fibonacci series. This total can be subdivided into categories based on the number of covering diamonds. The number of categories increase with the length of the row providing the structure of the triangle (see illustrations in the link below).
The above process provides a way to subdivide the individual Fibonacci numbers.
Comparing the diamond covering of a row of triangles shown here to the diamond corona of a hexagon A380346 or a diamond A380416 may be instructive.
A381552 provides additional graphics that help explain the diamond covering.

Examples

			Triangle begins:
  1, 4;
  1, 8, 4;
  1, 13, 16, 4;
  1, 19, 41, 24, 4;
  1, 26, 85, 85, 32, 4;
  1, 34, 155, 231, 145, 40, 4;
		

Crossrefs

Showing 1-10 of 14 results. Next