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 21-28 of 28 results.

A191740 Dispersion of A047220, (numbers >1 and congruent to 0 or 1 or 3 mod 5), by antidiagonals.

Original entry on oeis.org

1, 3, 2, 6, 5, 4, 11, 10, 8, 7, 20, 18, 15, 13, 9, 35, 31, 26, 23, 16, 12, 60, 53, 45, 40, 28, 21, 14, 101, 90, 76, 68, 48, 36, 25, 17, 170, 151, 128, 115, 81, 61, 43, 30, 19, 285, 253, 215, 193, 136, 103, 73, 51, 33, 22, 476, 423, 360, 323, 228, 173, 123
Offset: 1

Views

Author

Clark Kimberling, Jun 14 2011

Keywords

Comments

For a background discussion of dispersions and their fractal sequences, see A191426. For dispersions of congruence sequences mod 3, mod 4, or mod 5, see A191655, A191663, A191667, A191702.
...
Suppose that {2,3,4,5,6} is partitioned as {x1, x2} and {x3,x4,x5}. Let S be the increasing sequence of numbers >1 and congruent to x1 or x2 mod 5, and let T be the increasing sequence of numbers >1 and congruent to x3 or x4 or x5 mod 5. There are 10 sequences in S, each matched by a (nearly) complementary sequence in T. Each of the 20 sequences generates a dispersion, as listed here:
...
A191722=dispersion of A008851 (0, 1 mod 5 and >1)
A191723=dispersion of A047215 (0, 2 mod 5 and >1)
A191724=dispersion of A047218 (0, 3 mod 5 and >1)
A191725=dispersion of A047208 (0, 4 mod 5 and >1)
A191726=dispersion of A047216 (1, 2 mod 5 and >1)
A191727=dispersion of A047219 (1, 3 mod 5 and >1)
A191728=dispersion of A047209 (1, 4 mod 5 and >1)
A191729=dispersion of A047221 (2, 3 mod 5 and >1)
A191730=dispersion of A047211 (2, 4 mod 5 and >1)
A191731=dispersion of A047204 (3, 4 mod 5 and >1)
...
A191732=dispersion of A047202 (2,3,4 mod 5 and >1)
A191733=dispersion of A047206 (1,3,4 mod 5 and >1)
A191734=dispersion of A032793 (1,2,4 mod 5 and >1)
A191735=dispersion of A047223 (1,2,3 mod 5 and >1)
A191736=dispersion of A047205 (0,3,4 mod 5 and >1)
A191737=dispersion of A047212 (0,2,4 mod 5 and >1)
A191738=dispersion of A047222 (0,2,3 mod 5 and >1)
A191739=dispersion of A008854 (0,1,4 mod 5 and >1)
A191740=dispersion of A047220 (0,1,3 mod 5 and >1)
A191741=dispersion of A047217 (0,1,2 mod 5 and >1)
...
For further information about these 20 dispersions, see A191722.
...
Regarding the dispersions A191722-A191741, there are general formulas for sequences of the type "(a or b mod m)" and "(a or b or c mod m)" used in the relevant Mathematica programs.

Examples

			Northwest corner:
1....3....6....11...20
2....5....10...18...31
4....8....15...26...45
7....13...23...40...68
9....16...28...48...81
12...21...36...61...103
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array t of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a=3; b=5; c2=6; m[n_]:=If[Mod[n,3]==0,1,0];
    f[n_]:=a*m[n+2]+b*m[n+1]+c2*m[n]+5*Floor[(n-1)/3]
    Table[f[n], {n, 1, 30}]  (* A047220 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
      (* A191740 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191740  *)

A191741 Dispersion of A047217, (numbers >1 and congruent to 0 or 1 or 2 mod 5), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 6, 4, 10, 11, 7, 8, 17, 20, 12, 15, 9, 30, 35, 21, 26, 16, 13, 51, 60, 36, 45, 27, 22, 14, 86, 101, 61, 76, 46, 37, 25, 18, 145, 170, 102, 127, 77, 62, 42, 31, 19, 242, 285, 171, 212, 130, 105, 71, 52, 32, 23, 405, 476, 286, 355, 217, 176, 120
Offset: 1

Views

Author

Clark Kimberling, Jun 14 2011

Keywords

Comments

For a background discussion of dispersions and their fractal sequences, see A191426. For dispersions of congruence sequences mod 3, mod 4, or mod 5, see A191655, A191663, A191667, A191702.
...
Suppose that {2,3,4,5,6} is partitioned as {x1, x2} and {x3,x4,x5}. Let S be the increasing sequence of numbers >1 and congruent to x1 or x2 mod 5, and let T be the increasing sequence of numbers >1 and congruent to x3 or x4 or x5 mod 5. There are 10 sequences in S, each matched by a (nearly) complementary sequence in T. Each of the 20 sequences generates a dispersion, as listed here:
...
A191722=dispersion of A008851 (0, 1 mod 5 and >1)
A191723=dispersion of A047215 (0, 2 mod 5 and >1)
A191724=dispersion of A047218 (0, 3 mod 5 and >1)
A191725=dispersion of A047208 (0, 4 mod 5 and >1)
A191726=dispersion of A047216 (1, 2 mod 5 and >1)
A191727=dispersion of A047219 (1, 3 mod 5 and >1)
A191728=dispersion of A047209 (1, 4 mod 5 and >1)
A191729=dispersion of A047221 (2, 3 mod 5 and >1)
A191730=dispersion of A047211 (2, 4 mod 5 and >1)
A191731=dispersion of A047204 (3, 4 mod 5 and >1)
...
A191732=dispersion of A047202 (2,3,4 mod 5 and >1)
A191733=dispersion of A047206 (1,3,4 mod 5 and >1)
A191734=dispersion of A032793 (1,2,4 mod 5 and >1)
A191735=dispersion of A047223 (1,2,3 mod 5 and >1)
A191736=dispersion of A047205 (0,3,4 mod 5 and >1)
A191737=dispersion of A047212 (0,2,4 mod 5 and >1)
A191738=dispersion of A047222 (0,2,3 mod 5 and >1)
A191739=dispersion of A008854 (0,1,4 mod 5 and >1)
A191740=dispersion of A047220 (0,1,3 mod 5 and >1)
A191741=dispersion of A047217 (0,1,2 mod 5 and >1)
...
For further information about these 20 dispersions, see A191722.
...
Regarding the dispersions A191722-A191741, there are general formulas for sequences of the type "(a or b mod m)" and "(a or b or c mod m)" used in the relevant Mathematica programs.

Examples

			Northwest corner:
1....2....5....10...17
3....6....11...20...35
4....7....12...21...36
8....15...26...45...76
9....16...27...46...77
13...22...37...62...105
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array t of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a=2; b=5; c2=6; m[n_]:=If[Mod[n,3]==0,1,0];
    f[n_]:=a*m[n+2]+b*m[n+1]+c2*m[n]+5*Floor[(n-1)/3]
    Table[f[n], {n, 1, 30}]  (* A047217 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191741 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191741  *)

A299645 Numbers of the form m*(8*m + 5), where m is an integer.

Original entry on oeis.org

0, 3, 13, 22, 42, 57, 87, 108, 148, 175, 225, 258, 318, 357, 427, 472, 552, 603, 693, 750, 850, 913, 1023, 1092, 1212, 1287, 1417, 1498, 1638, 1725, 1875, 1968, 2128, 2227, 2397, 2502, 2682, 2793, 2983, 3100, 3300, 3423, 3633, 3762, 3982, 4117, 4347, 4488, 4728, 4875
Offset: 1

Views

Author

Bruno Berselli, Feb 26 2018

Keywords

Comments

Equivalently, numbers k such that 32*k + 25 is a square. This means that 4*a(n) + 3 is a triangular number.
Interleaving of A139277 and A139272 (without 0).

Crossrefs

Subsequence of A011861, A047222.
Cf. numbers of the form m*(8*m + h): A154260 (h=1), A014494 (h=2), A274681 (h=3), A046092 (h=4), this sequence (h=5), 2*A074377 (h=6), A274979 (h=7).

Programs

  • GAP
    List([1..50], n -> (8*n*(n-1)-(2*n-1)*(-1)^n-1)/4);
    
  • Julia
    [div((8n*(n-1)-(2n-1)*(-1)^n-1), 4) for n in 1:50] # Peter Luschny, Feb 27 2018
  • Magma
    [(8*n*(n-1)-(2*n-1)*(-1)^n-1)/4: n in [1..50]];
    
  • Maple
    seq((exp(I*Pi*x)*(1-2*x)+8*(x-1)*x-1)/4, x=1..50); # Peter Luschny, Feb 27 2018
  • Mathematica
    Table[(8 n (n - 1) - (2 n - 1) (-1)^n - 1)/4, {n, 1, 50}]
  • Maxima
    makelist((8*n*(n-1)-(2*n-1)*(-1)^n-1)/4, n, 1, 50);
    
  • PARI
    vector(50, n, nn; (8*n*(n-1)-(2*n-1)*(-1)^n-1)/4)
    
  • PARI
    concat(0, Vec(x^2*(3 + 10*x + 3*x^2)/((1 - x)^3*(1 + x)^2) + O(x^60))) \\ Colin Barker, Feb 27 2018
    
  • Python
    [(8*n*(n-1)-(2*n-1)*(-1)**n-1)/4 for n in range(1, 60)]
    
  • Python
    def A299645(n): return (n>>1)*((n<<2)+(1 if n&1 else -5)) # Chai Wah Wu, Mar 11 2025
    
  • Sage
    [(8*n*(n-1)-(2*n-1)*(-1)^n-1)/4 for n in (1..50)]
    

Formula

O.g.f.: x^2*(3 + 10*x + 3*x^2)/((1 - x)^3*(1 + x)^2).
E.g.f.: (1 + 2*x - (1 - 8*x^2)*exp(2*x))*exp(-x)/4.
a(n) = a(-n+1) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (8*n*(n - 1) - (2*n - 1)*(-1)^n - 1)/4 = (2*n + (-1)^n - 1)*(4*n - 3*(-1)^n - 2)/4. Therefore, 3 and 13 are the only prime numbers in this sequence.
a(n) + a(n+1) = 4*n^2 for even n, otherwise a(n) + a(n+1) = 4*n^2 - 1.
From Amiram Eldar, Mar 18 2022: (Start)
Sum_{n>=2} 1/a(n) = 8/25 + (sqrt(2)-1)*Pi/5.
Sum_{n>=2} (-1)^n/a(n) = 8*log(2)/5 - sqrt(2)*log(2*sqrt(2)+3)/5 - 8/25. (End)
a(n) = (n-1)*(4*n+1)/2 if n is odd and a(n) = n*(4*n-5)/2 if n is even. - Chai Wah Wu, Mar 11 2025

A072835 Exponents occurring in expansion of F_9(q^2).

Original entry on oeis.org

0, 8, 14, 18, 20, 26, 32, 36, 38, 44, 50, 54, 56, 62, 68, 72, 74, 80, 86, 90, 92, 98, 104, 108, 110, 116, 122, 126, 128, 134, 140, 144, 146, 152, 158, 162, 164, 170, 176, 180, 182, 188, 194, 198, 200, 206, 212, 216, 218, 224, 230, 234, 236, 242, 248, 252, 254, 260, 266, 270, 272, 278
Offset: 0

Views

Author

N. J. A. Sloane, Jul 25 2002

Keywords

Comments

Twice (A242660 without 1). Also, norms of vectors of the A*8 lattice. - _Andrey Zabolotskiy, Nov 10 2021

Crossrefs

Programs

  • Mathematica
    f[x_, y_]:= QPochhammer[-x, x*y]*QPochhammer[-y, x*y]*QPochhammer[x*y, x*y];
    F[9,q_]:= f[q^9, q^9]^8 - 16*q^9*f[q^9, q^27]^8 + 256*q^18*f[q^18, q^54]^8 + 18*q^8*QPochhammer[q^18]^12/QPochhammer[q^6]^4;
    cfs = CoefficientList[Series[F[9, q], {q, 0, 500}], q];
    Take[Pick[Range[Length[cfs]] - 1, Sign[Abs[cfs]], 1], 50] (* G. C. Greubel, Apr 16 2018 *)

Formula

G.f.: -2*x*(x^4-x^3-2*x^2-3*x-4) / (x^5-x^4-x+1). - Colin Barker, Jul 31 2013
a(n+4) = a(n) + 18 for n > 0. - Jerzy R Borysowicz, Sep 02 2023
a(n)/n ~ 9/2. - Jerzy R Borysowicz, Sep 03 2023
a(n) = 2 * A056991(n+1) for n>=1. - Alois P. Heinz, Sep 03 2023

Extensions

Terms a(22) onward added by G. C. Greubel, Apr 16 2018

A274609 Primes p such that both 2p-1 and 2p^2-2p+1 are prime.

Original entry on oeis.org

2, 3, 31, 331, 1171, 2011, 2281, 3181, 4621, 4861, 6151, 6211, 6961, 7951, 8521, 9151, 11251, 12211, 13411, 15661, 17491, 18121, 19141, 20641, 22531, 23071, 23581, 24631, 25411, 26041, 26161, 26431, 26641, 27091, 27271, 27361, 27691, 28201, 28621, 29221, 31891, 33151, 34261, 35491, 36451
Offset: 1

Views

Author

Richard R. Forberg, Jun 30 2016

Keywords

Comments

All values of a(n), except {2,3}, are equal to 1 mod 30.
These are also primes p such that both p^2+c and p^2-c are positive primes, for some c, when c is a square, since that requires c = (p-1)^2. Corresponding c values begin {1, 4, 900, 108900, ...}. This relates to a comment at A047222.

Examples

			31^2 - 30^2 = 61 and 31^2 + 30^2 = 1861 are both prime.
		

Crossrefs

Cf. A047222.

Programs

  • Mathematica
    result = {}; Do[If[PrimeQ[2*Prime[i] - 1] && PrimeQ[2*Prime[i]^2 - 2*Prime[i] + 1], AppendTo[result, Prime[i]]], {i, 1, 10000}]; result
    Select[Prime[Range[4000]],AllTrue[{2#-1,2#^2-2#+1},PrimeQ]&] (* Harvey P. Dale, Dec 26 2022 *)
  • PARI
    is(n)=isprime(2*n-1) && isprime(2*n^2-2*n+1) && isprime(n) \\ Charles R Greathouse IV, Jul 15 2016

A047363 Numbers that are congruent to {0, 2, 3, 4, 5} mod 7.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 9, 10, 11, 12, 14, 16, 17, 18, 19, 21, 23, 24, 25, 26, 28, 30, 31, 32, 33, 35, 37, 38, 39, 40, 42, 44, 45, 46, 47, 49, 51, 52, 53, 54, 56, 58, 59, 60, 61, 63, 65, 66, 67, 68, 70, 72, 73, 74, 75, 77, 79
Offset: 1

Views

Author

Keywords

Comments

Conjecture: Apart from 0, and the further exclusions noted below, the sequence gives the values of c/6 such that an infinite number of primes, p, result in both p^3+c and p^3-c being positive primes. Taking the complement we say: the excluded c/6 values are {1,6} mod 7. See A005097 for a conjecture on the modulo patterns of excluded c/6 values for the general case of p^q + c and p^q - c both prime, for any q > 0, and see A047222 for q=2. Note that polynomial factorization also excludes a few c/6 values. This occurs here when c is an even cube (A016743), which requires a further exclusion of certain c/6 values in this sequence when (6c)^3/6 == 0 (mod 7), or c/6 = {0, 12348, 98784, ...}. - Richard R. Forberg, Jun 28 2016

Crossrefs

Programs

  • Mathematica
    Table[7 n + {0, 2, 3, 4, 5}, {n, 0, 12}] // Flatten (* or *)
    Select[Range[0, 79], ! MemberQ[{1, 6}, Mod[#, 7]] &] (* or *)
    Rest@ CoefficientList[Series[x^2 (2 x^2 + 3 x + 2) (x^2 - x + 1)/((x^4 + x^3 + x^2 + x + 1) (x - 1)^2), {x, 0, 57}], x] (* Michael De Vlieger, Jul 25 2016 *)

Formula

G.f.: x^2*(2*x^2 + 3*x + 2)*(x^2 - x + 1) / ( (x^4 + x^3 + x^2 + x + 1)*(x-1)^2 ). - R. J. Mathar, Dec 04 2011
a(n) = a(n-1) + a(n-5) - a(n-6). - Wesley Ivan Hurt, Sep 03 2022

A274610 Values of c such that p^2-c and p^2+c are both positive primes, for the special case when p^2-c = 3, or c = p^2-3, where p is a prime.

Original entry on oeis.org

1, 22, 118, 358, 1678, 3478, 5038, 6238, 10198, 17158, 19318, 22798, 32758, 36478, 52438, 58078, 72358, 109558, 143638, 177238, 212518, 229438, 248998, 259078, 326038, 410878, 434278, 502678, 737878, 863038, 982078, 1062958, 1100398, 1274638, 1442398, 1515358, 1559998, 1635838, 1907158, 2042038
Offset: 1

Views

Author

Richard R. Forberg, Jun 30 2016

Keywords

Comments

All values of a(n), except {1, 22}, equal 118 mod 120.
Corresponding values of p = sqrt(c+3)begin {2,5,11,19,41,59,71,79,101...}.
This relates to a comment at A047222 regarding c values for the general case of p^2-c and p^2+c both being positive primes.

Programs

  • Mathematica
    result = {}; Do[c = Prime[i]^2 - 3; If[PrimeQ[Prime[i]^2 + c], AppendTo[result, {Prime[i], c}]], {i, 1, 1000}]; result
  • PARI
    lista(nn) = forprime(p=2, nn, if (isprime(2*p^2-3), print1(p^2-3, ", "))); \\ Michel Marcus, Jul 05 2016

A215205 a(n) = (-1)^n * (A060819(n) + A060819(n+1)).

Original entry on oeis.org

1, -2, 4, -4, 6, -8, 10, -9, 11, -14, 16, -14, 16, -20, 22, -19, 21, -26, 28, -24, 26, -32, 34, -29, 31, -38, 40, -34, 36, -44, 46, -39, 41, -50, 52, -44, 46, -56, 58, -49, 51, -62, 64, -54, 56, -68, 70, -59, 61, -74, 76, -64, 66, -80, 82, -69, 71, -86, 88, -74, 76, -92, 94, -79, 81, -98, 100, -84
Offset: 0

Views

Author

Paul Curtz, Aug 06 2012

Keywords

Comments

a(-1)=1=a(0).
a(n) - a(n-1) = b(n) = 0, -3, 6, -8, 10, -14, 18, -19, 20, -25, 30, -30, 30, -36, 42, -41, ... .
Missing terms in abs(a(n)):
PIII(n) = 0, 3, 5, 7, 12, 13, 15, 17, 18, 23, 25, 27, 30, 33, 35, 37, 42, ... . See A063241(n+1) and 6*A047222(n+1).
Quasipolynomial of order 4. - Charles R Greathouse IV, Aug 06 2012

Crossrefs

Programs

  • Mathematica
    a[n_] := Switch[Mod[n, 4], 0, 5n/4+1, 1, (-3n-1)/2, 2, 3n/2+1, 3, (-5n-1)/4]; Table[a[n], {n, 0, 67}] (* Jean-François Alcover, Nov 08 2012 *)

Formula

a(4*n) = 1+5*n, a(1+4*n) = -2-6*n, a(2+4*n) = 4+6*n, a(3+4*n) = -4-5*n.
a(n+4) - a(n) = period of length 4: repeat 5,-6, 6, -5.
a(n) = 2*a(n-4) + a(n-8).
G.f. ( -1+x-3*x^2-3*x^4+x^3+x^5-x^6 ) / ( (x-1)*(1+x)^2*(x^2+1)^2 ). - R. J. Mathar, Aug 07 2012
a(n) = (5+(2*n+1)*(11*(-1)^n-(-1)^((2*n-1+(-1)^n)/4))+(-1)^((6*n-1 +(-1)^n)/4))/16. - Luce ETIENNE, Jun 05 2015
Previous Showing 21-28 of 28 results.