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

A094414 Triangle T read by rows: dot product <1,2,...,r> * .

Original entry on oeis.org

1, 5, 4, 14, 11, 11, 30, 24, 22, 24, 55, 45, 40, 40, 45, 91, 76, 67, 64, 67, 76, 140, 119, 105, 98, 98, 105, 119, 204, 176, 156, 144, 140, 144, 156, 176, 285, 249, 222, 204, 195, 195, 204, 222, 249, 385, 340, 305, 280, 265, 260, 265, 280, 305, 340, 506, 451, 407, 374, 352, 341, 341, 352, 374, 407, 451
Offset: 0

Views

Author

Ralf Stephan, May 02 2004

Keywords

Comments

Offset for r (the rows) is 1, for s (the columns) it is 0.

Examples

			Triangle begins as:
   1;
   5,  4;
  14, 11, 11;
  30, 24, 22, 24;
  55, 45, 40, 40, 45;
  91, 76, 67, 64, 67, 76;
		

Crossrefs

Row sums are A000537.
See also A094415, A088003.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n-1], k-> n*((n+1)*(2*n+1) -3*k*(n-k))/6 ))); # G. C. Greubel, Oct 30 2019
  • Magma
    [n*((n+1)*(2*n+1) -3*k*(n-k))/6: k in [0..n-1], n in [0..12]]; // G. C. Greubel, Oct 30 2019
    
  • Maple
    T:=proc(r,s) if s>=r then 0 else r*(2*r^2+3*r+1-3*r*s+3*s^2)/6 fi end: for r from 1 to 11 do seq(T(r,s),s=0..r-1) od; # yields sequence in triangular form # Emeric Deutsch, Nov 27 2006
  • Mathematica
    Table[n*((n+1)*(2*n+1) -3*k*(n-k))/6, {n,0,12}, {k,0,n-1}]//Flatten (* G. C. Greubel, Oct 30 2019 *)
  • PARI
    T(n,k) = n*((n+1)*(2*n+1) -3*k*(n-k))/6;
    for(n=0,12, for(k=0,n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 30 2019
    
  • Sage
    [[n*((n+1)*(2*n+1) -3*k*(n-k))/6 for k in (0..n-1)] for n in (0..12)] # G. C. Greubel, Oct 30 2019
    

Formula

T(r, s) = r*(2*r^2 + 3*r - 3*r*s + 1 + 3*s^2)/6, r >= 1, 0 <= s <= r-1.

Extensions

More terms from G. C. Greubel, Oct 30 2019

A094415 Triangle T read by rows: dot product * .

Original entry on oeis.org

1, 4, 5, 10, 13, 13, 20, 26, 28, 26, 35, 45, 50, 50, 45, 56, 71, 80, 83, 80, 71, 84, 105, 119, 126, 126, 119, 105, 120, 148, 168, 180, 184, 180, 168, 148, 165, 201, 228, 246, 255, 255, 246, 228, 201, 220, 265, 300, 325, 340, 345, 340, 325, 300, 265, 286, 341
Offset: 0

Views

Author

Ralf Stephan, May 02 2004

Keywords

Examples

			Triangle begins as:
   1;
   4,  5;
  10, 13, 13;
  20, 26, 28, 26;
  35, 45, 50, 50, 45;
  56, 71, 80, 83, 80, 71;
		

Crossrefs

Half-diagonal is A050410.
Row sums are A000537.
See also A094414, A088003.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 ))); # G. C. Greubel, Oct 30 2019
  • Magma
    [(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6: k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 30 2019
    
  • Maple
    seq(seq( (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 , k=0..n), n=0..12); # G. C. Greubel, Oct 30 2019
  • Mathematica
    Table[(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 30 2019 *)
  • PARI
    T(n,k) = (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6;
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 30 2019
    
  • Sage
    [[(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Oct 30 2019
    

Formula

T(n, k) = n*(n^2 + 3*n*(1+k) + 2 - 3*k^2)/6 for n >= 0, 0 <= k <= n.

A212970 Number of (w,x,y) with all terms in {0,...,n} and w != x and x < range(w,x,y).

Original entry on oeis.org

0, 2, 8, 22, 44, 80, 128, 196, 280, 390, 520, 682, 868, 1092, 1344, 1640, 1968, 2346, 2760, 3230, 3740, 4312, 4928, 5612, 6344, 7150, 8008, 8946, 9940, 11020, 12160, 13392, 14688, 16082, 17544, 19110, 20748, 22496, 24320, 26260, 28280
Offset: 0

Views

Author

Clark Kimberling, Jun 02 2012

Keywords

Comments

For a guide to related sequences, see A212959.
Twice the partial sums of A210977. - J. M. Bergot, Aug 10 2013

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w != x < (Max[w, x, y] - Min[w, x, y]),
       s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 60]]   (* A212970 *)
    m/2 (* essentially A088003 *)

Formula

a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
G.f.: f(x)/g(x), where f(x) = 2*x*(1 + 2*x + 2*x^2) and g(x) = ((1-x)^4)(1+x)^2.
a(n) = 2 * A088003(n) for n>0.
From Ayoub Saber Rguez, Mar 31 2023: (Start)
a(n) + A212969(n+1) = A045991(n+1).
a(n) = (10*n^3 + 24*n^2 + 8*n + (6*n)*(n mod 2))/24. (End)

Extensions

Typo in name corrected by Ayoub Saber Rguez, Mar 31 2023

A174814 a(n) = n*(n+1)*(5*n+1)/3.

Original entry on oeis.org

0, 4, 22, 64, 140, 260, 434, 672, 984, 1380, 1870, 2464, 3172, 4004, 4970, 6080, 7344, 8772, 10374, 12160, 14140, 16324, 18722, 21344, 24200, 27300, 30654, 34272, 38164, 42340, 46810, 51584, 56672, 62084, 67830, 73920, 80364, 87172, 94354, 101920, 109880
Offset: 0

Views

Author

Bruno Berselli, Dec 01 2010 - Dec 02 2010

Keywords

Comments

Also zero followed by bisection (even part) of A088003.
Numbers ending in 0, 2 or 4 (cf. 2*A053796(n)). Therefore we can easily see that a(m)^(2*k+1)==-1 (mod 5) only for m in A047219, while a(m)^(2*k)==-1 (mod 5) only for m in A016873 and k odd.

Programs

Formula

G.f.: 2*x*(2+3*x)/(1-x)^4.
a(n) = 2*A033994(n) for n>0.
a(n) = n*A147875(n+1)-sum(k=1..n, A147875(k)) for n>0.
a(-n) = -A144945(n).

A299053 Minimum value of the cyclic autocorrelation of first n primes.

Original entry on oeis.org

4, 12, 31, 62, 133, 224, 377, 558, 865, 1304, 1805, 2462, 3337, 4280, 5389, 6726, 8449, 10264, 12663, 15294, 18061, 21200, 24961, 29166, 34173, 39508, 45017, 50870, 57141, 63788, 72299, 81234, 91365, 101732, 113327, 125166, 138355, 152348, 167179, 182862
Offset: 1

Views

Author

Andres Cicuttin, Feb 01 2018

Keywords

Comments

Maximum values of the cyclic autocorrelation of first n primes are in A024450.
If we use this definition with integers instead of primes it is obtained A088003.

Examples

			For n = 4 the four possible cyclic autocorrelations of first four primes are:
(2,3,5,7).(2,3,5,7) = 2*2 + 3*3 + 5*5 + 7*7 = 4 + 9 + 25 + 49 = 87,
(2,3,5,7).(7,2,3,5) = 2*7 + 3*2 + 5*3 + 7*5 = 14 + 6 + 15 + 35 = 70,
(2,3,5,7).(5,7,2,3) = 2*5 + 3*7 + 5*2 + 7*3 = 10 + 21 + 10 + 21 = 62,
(2,3,5,7).(3,5,7,2) = 2*3 + 3*5 + 5*7 + 7*2 = 6 + 15 + 35 + 14 = 70,
then a(4)=62 because 62 is the minimum among the four values.
		

Crossrefs

Programs

  • Maple
    a:= n-> min(seq(add(ithprime(i)*ithprime(irem(i+k, n)+1), i=1..n), k=1..n)):
    seq(a(n), n=1..40);  # Alois P. Heinz, Feb 06 2018
  • Mathematica
    p[n_]:=Prime[Range[n]];
    Table[Table[p[n].RotateRight[p[n],j],{j,0,n-1}]//Min,{n,1,36}]
  • PARI
    a(n) = vecmin(vector(n, k, sum(i=1, n, prime(i)*prime(1+(i+k)%n)))); \\ Michel Marcus, Feb 07 2018

Formula

a(n) = Min_{k=1..n} Sum_{i=1..n} prime(i)*prime(1 + (i+k) mod n).
Showing 1-5 of 5 results.