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.

Previous Showing 41-50 of 56 results. Next

A308215 a(n) is the multiplicative inverse of A001844(n+1) modulo A001844(n); where A001844 is the sequence of centered square numbers.

Original entry on oeis.org

0, 2, 12, 11, 39, 28, 82, 53, 141, 86, 216, 127, 307, 176, 414, 233, 537, 298, 676, 371, 831, 452, 1002, 541, 1189, 638, 1392, 743, 1611, 856, 1846, 977, 2097, 1106, 2364, 1243, 2647, 1388, 2946, 1541, 3261, 1702, 3592, 1871, 3939, 2048
Offset: 0

Views

Author

Daniel Hoyt, May 15 2019

Keywords

Comments

The sequence explores the relationship between the terms of A001844, the sums of consecutive squares. The sequence is an interleaving of A054552 (a number spiral arm) and (A001844-n). The gap between the lower values of A308215 and the upper values of A308217 increase by 3n; each successive gap increasing by 6.

Crossrefs

Programs

  • PARI
    f(n) = 2*n*(n+1)+1; \\ A001844
    a(n) = lift(1/Mod(f(n+1), f(n))); \\ Michel Marcus, May 16 2019
  • Python
    import gmpy2
    sos = [] # sum of squares
    a=0
    b=1
    for i in range(50):
        c = a**2 + b**2
        sos.append(c)
        a +=1
        b +=1
    ls = []
    for i in range(len(sos)-1):
        c = gmpy2.invert(sos[i+1],sos[i])
        ls.append(int(c))
    print(ls)
    

Formula

a(n) satisfies a(n)*(2*n*(n+1)+1) == 1 (mod 2*n*(n-1)+1).
Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x*(2 + 12*x + 5*x^2 + 3*x^3 + x^4 + x^5) / ((1 - x)^3*(1 + x)^3).
a(n) = (3 + (-1)^n + 2*(2+(-1)^n)*n + 2*(3+(-1)^n)*n^2) / 4 for n>0.
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>6.
(End)

A308217 a(n) is the multiplicative inverse of A001844(n) modulo A001844(n+1); where A001844 is the sequence of centered square numbers.

Original entry on oeis.org

1, 8, 2, 23, 3, 46, 4, 77, 5, 116, 6, 163, 7, 218, 8, 281, 9, 352, 10, 431, 11, 518, 12, 613, 13, 716, 14, 827, 15, 946, 16, 1073, 17, 1208, 18, 1351, 19, 1502, 20, 1661, 21, 1828, 22, 2003, 23, 2186, 24, 2377, 25, 2576, 26, 2783, 27, 2998, 28, 3221, 29, 3452
Offset: 0

Views

Author

Daniel Hoyt, May 15 2019

Keywords

Comments

The sequence explores the relationship between the terms of A001844, the sums of consecutive squares. The sequence is an interleaving of A033951 (a number spiral arm) and the natural numbers. The gap between the lower values of A308215 and the upper values of A308217 increase by 3n; each successive gap increasing by 6.

Crossrefs

Programs

Formula

a(n) satisfies a(n)*(2*n*(n-1)+1) == 1 (mod 2*n*(n+1)+1).
Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: (1 + 8*x - x^2 - x^3 + x^5) / ((1 - x)^3*(1 + x)^3).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>5.
a(n) = (9 - 5*(-1)^n + (8-6*(-1)^n)*n - 2*(-1+(-1)^n)*n^2) / 4. (End)
From Robert Israel, Aug 11 2019: (Start)
a(n) = 1 + n/2 if n is even, since 0 < 1+n/2 < A001844(n+1) and (1+n/2)*A001844(n)-1 = (n/2)*A001844(n+1).
a(n) = n^2 + 7/2*(n+1) if n is odd, since 0 < n^2+7/2*(n+1) < A001844(n+1) and (n^2+7/2*(n+1))*A001844(n)-1 = (n^2+3*k/2+1/2)*A001844(n+1).
Colin Barker's conjectures easily follow. (End)
E.g.f.: ((2 + 9*x)*cosh(x) + (7 + x + 2*x^2)*sinh(x))/2. - Stefano Spezia, Dec 06 2024

A143861 Ulam's spiral (NNE spoke).

Original entry on oeis.org

1, 14, 59, 136, 245, 386, 559, 764, 1001, 1270, 1571, 1904, 2269, 2666, 3095, 3556, 4049, 4574, 5131, 5720, 6341, 6994, 7679, 8396, 9145, 9926, 10739, 11584, 12461, 13370, 14311, 15284, 16289, 17326, 18395, 19496, 20629, 21794, 22991, 24220
Offset: 1

Views

Author

Keywords

Comments

Stanislaw M. Ulam was doodling during the presentation of a "long and very boring paper" at a scientific meeting in 1963. The spiral is its result. Note that conforming to trigonometric conventions, the spiral begins on the abscissa and rotates counterclockwise. Other spirals, orientations, direction of rotation and initial values exist, even in the OEIS.
Also sequence found by reading the segment (1, 14) together with the line from 14, in the direction 14, 59, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 05 2012

References

  • Chris K. Caldwell & G. L. Honaker, Jr., Prime Curios! The Dictionary of Prime Number Trivia, CreateSpace, Sept 2009, pp. 2-3.

Crossrefs

Programs

  • GAP
    List([1..40], n-> ((32*n-35)^2 +55)/64); # G. C. Greubel, Nov 09 2019
  • Magma
    [((32*n-35)^2 +55)/64: n in [1..40]]; // G. C. Greubel, Nov 09 2019
    
  • Maple
    seq( ((32*n-35)^2 +55)/64, n=1..40); # G. C. Greubel, Nov 09 2019
  • Mathematica
    (* From Robert G. Wilson v, Oct 29 2011 *)
    f[n_]:= 16n^2 -35n +20; Array[f, 40]
    LinearRecurrence[{3,-3,1}, {1,14,59}, 40]
    FoldList[#1 + #2 &, 1, 32Range@ 10 - 19] (* End *)
    ((32*Range[40] -35)^2 +55)/64 (* G. C. Greubel, Nov 09 2019 *)
  • PARI
    a(n)=16*n^2-35*n+20 \\ Charles R Greathouse IV, Oct 29 2011
    
  • Sage
    [((32*n-35)^2 +55)/64 for n in (1..40)] # G. C. Greubel, Nov 09 2019
    

Formula

a(n) = 16*n^2 - 35*n + 20. - R. J. Mathar, Sep 08 2008
G.f.: x*(1 + 11*x + 20*x^2)/(1-x)^3. - Colin Barker, Aug 03 2012
E.g.f.: -20 + (20 - 19*x + 16*x^2)*exp(x). - G. C. Greubel, Nov 09 2019

A357745 Numbers on the 8 main spokes of a square spiral with 1 in the center.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 28, 31, 34, 37, 40, 43, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 86, 91, 96, 101, 106, 111, 116, 121, 127, 133, 139, 145, 151, 157, 163, 169, 176, 183, 190, 197, 204, 211, 218, 225, 233, 241, 249, 257, 265, 273
Offset: 1

Views

Author

Karl-Heinz Hofmann, Dec 22 2022

Keywords

Comments

The 8 main spokes are (with 1 in the center, 2 to the east, 3 to the northeast): east: A054552; northeast: A054554; north: A054556; northwest: A053755; west: A054567; southwest: A054569; south: A033951; southeast: A016754.
Alternatively the 8 main spokes are pairwise part of the 4 main axes: horizontal: A317186; vertical: A267682; diagonal: A002061; antidiagonal: A080335.
And lastly the 4 main axes are giving two main crosses: Horizontal-vertical cross: A039823; Diagonal-antidiagonal cross: A200975.

Examples

			See visualization in links.
		

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x (1 - x^8 + x^9)/((1 - x)^3*(1 + x) (1 + x^2) (1 + x^4)), {x, 0, 63}], x] (* Michael De Vlieger, Dec 29 2022 *)
    a[n_] := BitShiftRight[(n + 3)^2, 4] + Boole[BitAnd[n, 7] != 1]; Array[a, 65] (* Amiram Eldar, Dec 30 2022, after the PARI code *)
    LinearRecurrence[{2,-1,0,0,0,0,0,1,-2,1},{1,2,3,4,5,6,7,8,9,11},70] (* Harvey P. Dale, Jul 13 2025 *)
  • PARI
    a(n) = sqr(n+3)>>4 + (bitand(n,7)!=1); \\ Kevin Ryde, Dec 30 2022
  • Python
    def A357745(n): return ((n+3)**2 >> 4) + 1 if n % 8 != 1 else (n+3)**2 >> 4
    

Formula

G.f.: x*(1-x^8+x^9)/((1-x)^3*(1+x)*(1+x^2)*(1+x^4)). - Joerg Arndt, Dec 29 2022
a(n) = floor((n+3)^2 / 16) + (1 if n != 1 mod 8). - Kevin Ryde, Dec 30 2022

A078784 Primes on axis of Ulam square spiral (with rows ... / 7 8 9 / 6 1 2 / 5 4 3 / ... ) with origin at (1).

Original entry on oeis.org

2, 11, 19, 23, 53, 61, 127, 139, 151, 163, 233, 281, 431, 541, 613, 743, 827, 977, 1009, 1279, 1621, 1871, 2003, 2281, 2377, 2731, 3109, 3221, 3511, 3571, 3631, 3691, 4001, 4129, 4523, 4591, 5077, 6361, 6521, 7789, 7877, 8419, 9851, 10151, 10973, 11503, 11719, 11827, 12377, 12601, 12713, 13399
Offset: 1

Views

Author

Donald S. McDonald, Jan 10 2003

Keywords

Comments

Quadrants are numbered clockwise: 4=north, 1=east, 2=south, 3=west. The spiral numbers falling on axes (whether prime or not) are 4=north (2n+1)^2-n, 1=east (2n+1)^2+n+1, 2=south (2n)^2-(n-1), 3=west (2n)^2+n+1.
Primes to the left, right, above or below the 1 in the example in A054552.
This is the union of the primes in A168022, A168023, A168025 and A168027. - R. J. Mathar, Jul 11 2014

Examples

			For n=0, quadrant = 1, a(1) =  2, distance = 1;
for n=1, quadrant = 1, a(2) = 11, distance = 2;
for n=2, quadrant = 3, a(3) = 19, distance = 2.
		

Crossrefs

Programs

  • Mathematica
    Select[ Sort@ Flatten@ Table[ 4n^2 + (2j - 3)n + 1, {j, 0, 3}, {n, 58}], PrimeQ] (* Robert G. Wilson v, Jul 10 2014 *)

Formula

Primes in A039823(n) = ceiling((n^2 + n + 2)/4). - Georg Fischer, Dec 04 2024

Extensions

a(12) onward from Robert G. Wilson v, Jul 10 2014

A108781 Expansion of sqrt((1-x+8*x^2)/(1-x)^3).

Original entry on oeis.org

1, 1, 5, 9, 5, -7, 5, 73, 69, -295, -571, 1321, 4613, -4167, -32635, -1783, 211141, 200601, -1229243, -2468375, 6117509, 22557305, -21519611, -176980023, -13664955, 1234115673, 1250908869, -7608051031, -16094268667, 39424807225, 153179607429, -139981878647, -1243776268859
Offset: 0

Views

Author

N. J. A. Sloane and Nadia Heninger, Jun 28 2005

Keywords

Crossrefs

Square root of g.f. for A054552.

Programs

  • Magma
    m:=40; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!(Sqrt((1-x+8*x^2)/(1-x)^3))); // Vincenzo Librandi, Jan 25 2020
  • Mathematica
    CoefficientList[Series[Sqrt[(1-x+8x^2)/(1-x)^3],{x,0,50}],x] (* Harvey P. Dale, Dec 24 2018 *)

Formula

D-finite with recurrence: n*a(n) +(-2*n+1)*a(n-1) +(9*n-25)*a(n-2) +4*(-2*n+5)*a(n-3)=0. - R. J. Mathar, Jan 24 2020

A185413 A000027 written clockwise as spiral and read counterclockwise.

Original entry on oeis.org

2, 1, 4, 3, 12, 11, 10, 9, 8, 7, 6, 5, 16, 15, 14, 13, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 36, 35, 34, 33, 32, 31, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 64, 63, 62, 61, 60, 59, 58, 57
Offset: 1

Views

Author

Paul Curtz, Feb 08 2011

Keywords

Comments

A permutation of the natural numbers. Variant of A090861.

Examples

			  21--22--23--24--25--26
   |                   |
  20   7---8---9--10  27
   |   |           |   |
  19   6   1---2  11  28
   |   |       |   |   |
  18   5---4---3  12  29
   |               |   |
  17--16--15--14--13  30
                       |
  36--35--34--33--32--31
		

Crossrefs

A185669 a(n) = 4*n^2 + 3*n + 2.

Original entry on oeis.org

2, 9, 24, 47, 78, 117, 164, 219, 282, 353, 432, 519, 614, 717, 828, 947, 1074, 1209, 1352, 1503, 1662, 1829, 2004, 2187, 2378, 2577, 2784, 2999, 3222, 3453, 3692, 3939, 4194, 4457, 4728, 5007, 5294, 5589, 5892, 6203, 6522, 6849, 7184, 7527, 7878, 8237, 8604, 8979, 9362, 9753, 10152, 10559, 10974, 11397, 11828
Offset: 0

Views

Author

Paul Curtz, Feb 09 2011

Keywords

Comments

Natural numbers A000027 written clockwise as a square spiral:
.
43--44--45--46--47--48--49
|
42 21--22--23--24--25--26
| | |
41 20 7---8---9--10 27
| | | | |
40 19 6 1---2 11 28
| | | | | |
39 18 5---4---3 12 29
| | | |
38 17--16--15--14--13 30
| |
37--36--35--34--33--32--31
.
Walking in straight lines away from the center:
1, 2, 11, ... = A054552(n) = 1 -3*n+4*n^2,
1, 8, 23, ... = A033951(n) = 1 +3*n+4*n^2,
1, 3, 13, ... = A054554(n+1) = 1 -2*n-4*n^2,
1, 7, 21, ... = A054559(n+1) = 1 +2*n+4*n^2,
1, 4, 15, ... = A054556(n+1) = 1 -n+4*n^2,
1, 6, 19, ... = A054567(n+1) = 1 +n+4*n^2,
1, 5, 17, ... = A053755(n) = 1 +4*n^2,
1, 9, 25, ... = A016754(n) = 1 +4*n+4*n^2 = (1+2*n)^2,
2, 8, 22, ... = 2*A084849(n) = 2 +2*n+4*n^2,
2, 12, 30, ... = A002939(n+1) = 2 +6*n+4*n^2,
2, 9, 24, ... = a(n) = 2 +3*n+4*n^2,
2, 10, 26, ... = A069894(n) = 2 +4*n+4*n^2,
3, 11, 27, ... = A164897(n) = 3 +4*n+4*n^2,
3, 12, 29, ... = A054552(n+1)+1 = 3 +5*n+4*n^2,
3, 14, 33, ... = A033991(n+1) = 3 +7*n+4*n^2,
3, 15, 35, ... = A000466(n+1) = 3 +8*n+4*n^2,
4, 14, 32, ... = 2*A130883(n+1) = 4 +6*n+4*n^2,
4, 16, 36, ... = A016742(n+1) = 4 +8*n+4*n^2 = (2+2*n)^2,
5, 18, 39, ... = A007742(n+1) = 5 +9*n+4*n^2,
5, 19, 41, ... = A125202(n+2) = 5+10*n+4*n^2.

Programs

Formula

a(n) = a(n-1) + 8*n - 1.
a(n) = 2*a(n-1) - a(n-2) + 8.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (2 +3*x +3*x^2)/(1-x)^3 . - R. J. Mathar, Feb 11 2011
a(n) = A033954(n) + 2. - Bruno Berselli, Apr 10 2011
E.g.f.: (4*x^2 + 7*x + 2)*exp(x). - G. C. Greubel, Jul 09 2017

A241807 Numerators of c(n) = (n^2+n+2)/((n+1)*(n+2)*(n+3)) as defined in A241269.

Original entry on oeis.org

1, 1, 2, 7, 11, 2, 11, 29, 37, 23, 28, 67, 79, 23, 53, 121, 137, 77, 86, 191, 211, 29, 127, 277, 301, 163, 176, 379, 407, 109, 233, 497, 529, 281, 298, 631, 667, 88, 371, 781, 821, 431, 452, 947, 991, 259, 541, 1129, 1177, 613, 638
Offset: 0

Views

Author

Keywords

Comments

The subsequence 1, 23, 77, 163, 281, 431, 613, 827, ..., with indices congruent to 1 mod 8, is 16n^2+6n+1, that is, A000124(8n+1)/2 or A014206(8n+1)/4. Its second differences are constant: (16n^2+6n+1)'' = 32.
The sequence A014206/A241807 is integral and consists of the 16-periodic sequence (2, 4, 4, 2, 2, 16, 4, 2, 2, 4, 4, 2, 2, 8, 4, 2, ...).

Examples

			1/3, 1/6, 2/15, 7/60, 11/105, 2/21, 11/126, 29/360, 37/495, 23/330, ...
		

Crossrefs

Programs

  • Mathematica
    Table[(n^2+n+2)/((n+1)*(n+2)*(n+3)) // Numerator, {n, 0, 50}]

Formula

a(n) = A014206(n)/period 16: repeat 2, 4, 4, 2, 2, 16, 4, 2, 2, 4, 4, 2, 2, 8, 4, 2 (conjectured).
a(4k) = 8*k^2 +2*k +1,
a(4k+2) = 4*k^2 +5*k +2,
a(4k+3) = 8*k^2 +14*k +7,
a(8k+1) = 16*k^2 +6*k +1,
a(16k+5) = 16*k^2 +11*k +2,
a(16k+13) = 32*k^2 + 54*k +23.

A248825 a(n) = n^2 + 1 - (-1)^n.

Original entry on oeis.org

0, 3, 4, 11, 16, 27, 36, 51, 64, 83, 100, 123, 144, 171, 196, 227, 256, 291, 324, 363, 400, 443, 484, 531, 576, 627, 676, 731, 784, 843, 900, 963, 1024, 1091, 1156, 1227, 1296, 1371, 1444, 1523, 1600, 1683, 1764, 1851, 1936, 2027, 2116
Offset: 0

Views

Author

Paul Curtz, Oct 15 2014

Keywords

Comments

Also, A016742 and A164897 interleaved.
See the spiral in Example field of A054552: after 0, the sequence is given by the terms of the semidiagonals 4, 16, 36, 64, 100, ... and 3, 11, 27, 51, 83, ... sorted into ascending order.
Primes of the sequence are in A056899.

Crossrefs

Programs

  • Magma
    [n^2+1-(-1)^n: n in [0..60]]; // Vincenzo Librandi, Oct 16 2014
    
  • Mathematica
    Table[n^2 + 1 - (-1)^n, {n, 0, 60}] (* Vincenzo Librandi, Oct 16 2014 *)
    LinearRecurrence[{2,0,-2,1},{0,3,4,11},60] (* Harvey P. Dale, Jun 30 2019 *)
  • PARI
    vector(100,n,(n-1)^2+1+(-1)^n) \\ Derek Orr, Oct 15 2014
    
  • Sage
    [n^2+1-(-1)^n for n in (0..60)] # Bruno Berselli, Oct 16 2014

Formula

a(n) = a(-n) = 2*a(n-1) - 2*(n-3) + a(n-4).
a(n) = n^2 + A010673(n) = (n+1)^2 - A168277(n+1).
a(n+1) = A248800(n) + A042963(n+1) = a(n) + A166519(n).
a(n+2) = a(n) + 4*n.
a(n+5) = a(n-5) + A008602(n).
G.f.: x*(3 - 2*x + 3*x^2)/((1 + x)*(1 - x)^3). - Bruno Berselli, Oct 15 2014
Sum_{n>=1} 1/a(n) = Pi^2/24 + tanh(Pi/sqrt(2))*Pi/(4*sqrt(2)). - Amiram Eldar, Aug 21 2022

Extensions

Edited by Bruno Berselli, Oct 16 2014
Previous Showing 41-50 of 56 results. Next