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.

A195040 Square array read by antidiagonals with T(n,k) = k*n^2/4+(k-4)*((-1)^n-1)/8, n>=0, k>=0.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 3, 2, 1, 0, 1, 4, 5, 3, 1, 0, 0, 7, 8, 7, 4, 1, 0, 1, 9, 13, 12, 9, 5, 1, 0, 0, 13, 18, 19, 16, 11, 6, 1, 0, 1, 16, 25, 27, 25, 20, 13, 7, 1, 0, 0, 21, 32, 37, 36, 31, 24, 15, 8, 1, 0, 1, 25, 41, 48, 49, 45, 37, 28, 17, 9, 1, 0
Offset: 0

Views

Author

Omar E. Pol, Sep 27 2011

Keywords

Comments

Also, if k >= 2 and m = 2*k, then column k lists the numbers of the form k*n^2 and the centered m-gonal numbers interleaved.
For k >= 3, this is also a table of concentric polygonal numbers. Column k lists the concentric k-gonal numbers.
It appears that the first differences of column k are the numbers that are congruent to {1, k-1} mod k, if k >= 3.

Examples

			Array begins:
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0, ...
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  0,   1,   2,   3,   4,   5,   6,   7,   8,   9, ...
  1,   3,   5,   7,   9,  11,  13,  15,  17,  19, ...
  0,   4,   8,  12,  16,  20,  24,  28,  32,  36, ...
  1,   7,  13,  19,  25,  31,  37,  43,  49,  55, ...
  0,   9,  18,  27,  36,  45,  54,  63,  72,  81, ...
  1,  13,  25,  37,  49,  61,  73,  85,  97, 109, ...
  0,  16,  32,  48,  64,  80,  96, 112, 128, 144, ...
  1,  21,  41,  61,  81, 101, 121, 141, 161, 181, ...
  0,  25,  50,  75, 100, 125, 150, 175, 200, 225, ...
  ...
		

Crossrefs

Rows n: A000004 (n=0), A000012 (n=1), A001477 (n=2), A005408 (n=3), A008586 (n=4), A016921 (n=5), A008591 (n=6), A017533 (n=7), A008598 (n=8), A215145 (n=9), A008607 (n=10).
Columns k: A000035 (k=0), A004652 (k=1), A000982 (k=2), A077043 (k=3), A000290 (k=4), A032527 (k=5), A032528 (k=6), A195041 (k=7), A077221 (k=8), A195042 (k=9), A195142 (k=10), A195043 (k=11), A195143 (k=12), A195045 (k=13), A195145 (k=14), A195046 (k=15), A195146 (k=16), A195047 (k=17), A195147 (k=18), A195048 (k=19), A195148 (k=20), A195049 (k=21), A195149 (k=22), A195058 (k=23), A195158 (k=24).

Programs

  • GAP
    nmax:=13;; T:=List([0..nmax],n->List([0..nmax],k->k*n^2/4+(k-4)*((-1)^n-1)/8));; b:=List([2..nmax],n->OrderedPartitions(n,2));;
    a:=Flat(List([1..Length(b)],i->List([1..Length(b[i])],j->T[b[i][j][2]][b[i][j][1]]))); # Muniru A Asiru, Jul 19 2018
  • Maple
    A195040 := proc(n,k)
            k*n^2/4+((-1)^n-1)*(k-4)/8 ;
    end proc:
    for d from 0 to 12 do
            for k from 0 to d do
                    printf("%d,",A195040(d-k,k)) ;
            end do:
    end do; # R. J. Mathar, Sep 28 2011
  • Mathematica
    t[n_, k_] := k*n^2/4+(k-4)*((-1)^n-1)/8; Flatten[ Table[ t[n-k, k], {n, 0, 11}, {k, 0, n}]] (* Jean-François Alcover, Dec 14 2011 *)

A008602 Multiples of 20.

Original entry on oeis.org

0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, 1000
Offset: 0

Views

Author

Keywords

Comments

The multiples of 20 are exactly those integers which do not have a multiple whose decimal digits are of alternating parity. (International Mathematical Olympiad 2004, problem 6, see A110303) - Joseph Myers, Jul 13 2004

Crossrefs

Programs

Formula

G.f.: 20*x/(x - 1)^2. - Vincenzo Librandi, Jun 10 2013
E.g.f.: 20*x*exp(x). - Stefano Spezia, Feb 20 2020
From Elmo R. Oliveira, Apr 10 2025: (Start)
a(n) = 20*n = 2*A008592(n) = 10*A005843(n) = A317095(n)/2.
a(n) = 2*a(n-1) - a(n-2). (End)

A130154 Triangle read by rows: T(n, k) = 1 + 2*(n-k)*(k-1) (1 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 9, 7, 1, 1, 9, 13, 13, 9, 1, 1, 11, 17, 19, 17, 11, 1, 1, 13, 21, 25, 25, 21, 13, 1, 1, 15, 25, 31, 33, 31, 25, 15, 1, 1, 17, 29, 37, 41, 41, 37, 29, 17, 1, 1, 19, 33, 43, 49, 51, 49, 43, 33, 19, 1, 1, 21, 37, 49, 57, 61, 61, 57, 49, 37, 21, 1
Offset: 1

Views

Author

Emeric Deutsch, May 22 2007

Keywords

Comments

Column k, except for the initial k-1 0's, is an arithmetic progression with first term 1 and common difference 2(k-1). Row sums yield A116731. First column of the inverse matrix is A129779.
Studied by Paul Curtz circa 1993.
From Rogério Serôdio, Dec 19 2017: (Start)
T(n, k) gives the number of distinct sums of 2(k-1) elements in {1,1,2,2,...,n-1,n-1}. For example, T(6, 2) = the number of distinct sums of 2 elements in {1,1,2,2,3,3,4,4,5,5}, and because each sum from the smallest 1 + 1 = 2 to the largest 5 + 5 = 10 appears, T(6, 2) = 10 - 1 = 9. [In general: 2*(Sum_{j=1..(k-1)} n-j) - (2*(Sum_{j=1..k-1} j) - 1) = 2*n*(k-1) - 4*(k-1)*k/2 + 1 = 2*(k-1)*(n-k) + 1 = T(n, k). - Wolfdieter Lang, Dec 20 2017]
T(n, k) is the number of lattice points with abscissa x = 2*(k-1) and even ordinate in the closed region bounded by the parabola y = x*(2*(n-1) - x) and the x axis. [That is, (1/2)*y(2*(k-1)) + 1 = T(n, k). - Wolfdieter Lang, Dec 20 2017]
Pascal's triangle (A007318, but with apex in the middle) is formed using the rule South = West + East; the rascal triangle A077028 uses the rule South = (West*East + 1)/North; the present triangle uses a similar rule: South = (West*East + 2)/North. See the formula section for this recurrence. (End)

Examples

			The triangle T(n, k) starts:
  n\k  1  2  3  4  5  6  7  8  9 10 ...
  1:   1
  2:   1  1
  3:   1  3  1
  4:   1  5  5  1
  5:   1  7  9  7  1
  6:   1  9 13 13  9  1
  7:   1 11 17 19 17 11  1
  8:   1 13 21 25 25 21 13  1
  9:   1 15 25 31 33 31 25 15  1
 10:   1 17 29 37 41 41 37 29 17  1
 ... reformatted. - _Wolfdieter Lang_, Dec 19 2017
		

Crossrefs

Column sequences (no leading zeros): A000012, A016813, A016921, A017077, A017281, A017533, A131877, A158057, A161705, A215145.

Programs

  • GAP
    Flat(List([1..12], n-> List([1..n], k-> 1 + 2*(n-k)*(k-1) ))); # G. C. Greubel, Nov 25 2019
  • Magma
    [1 + 2*(n-k)*(k-1): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 25 2019
    
  • Maple
    T:=proc(n,k) if k<=n then 2*(n-k)*(k-1)+1 else 0 fi end: for n from 1 to 14 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[1+2(n-k)(k-1),{n,0,20},{k,n}]] (* Harvey P. Dale, Jul 13 2013 *)
  • PARI
    T(n, k) = 1 + 2*(n-k)*(k-1) \\ Iain Fox, Dec 19 2017
    
  • PARI
    first(n) = my(res = vector(binomial(n+1,2)), i = 1); for(r=1, n, for(k=1, r, res[i] = 1 + 2*(r-k)*(k-1); i++)); res \\ Iain Fox, Dec 19 2017
    
  • Sage
    [[1 + 2*(n-k)*(k-1) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 25 2019
    

Formula

T(n, k) = 1 + 2*(n-k)*(k-1) (1 <= k <= n).
G.f.: G(t,z) = t*z*(3*t*z^2 - z - t*z + 1)/((1-t*z)*(1-z))^2.
Equals = 2 * A077028 - A000012 as infinite lower triangular matrices. - Gary W. Adamson, Oct 23 2007
T(n, 1) = 1 and T(n, n) = 1 for n >= 1; T(n, k) = (T(n-1, k-1)*T(n-1, k) + 2)/T(n-2, k-1), for n > 2 and 1 < k < n. See a comment above. - Rogério Serôdio, Dec 19 2017
G.f. column k (with leading zeros): (x^k/(1-x)^2)*(1 + (2*k-3)*x), k >= 1. See the g.f. of the triangle G(t,z) above: (d/dt)^k G(t,x)/k!|{t=0}. - _Wolfdieter Lang, Dec 20 2017

Extensions

Edited by Wolfdieter Lang, Dec 19 2017

A327539 Starting from n: as long as the decimal representation starts with a positive even number, divide the largest such prefix by 2; a(n) corresponds to the final value.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 11, 11, 13, 3, 15, 13, 17, 7, 19, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 11, 11, 13, 11, 15, 13, 17, 3, 19, 15, 51, 13, 53, 17, 55, 7, 57, 19, 59, 15, 31, 31, 33, 1, 35, 33, 37, 17, 39, 35, 71
Offset: 0

Views

Author

Rémy Sigrist, Nov 29 2019

Keywords

Comments

For n > 0, as long as we have a number whose decimal representation is the concatenation of a positive even number, say u, and a possibly empty string of odd digits, say v, we replace this number with the concatenation of u/2 and v; eventually only odd digits remain.

Examples

			For n = 10000:
- 10000 gives 10000/2 = 5000,
- 5000 gives 5000/2 = 2500,
- 2500 gives 2500/2 = 1250,
- 1250 gives 125/2 = 625,
- 625 gives 62/2 followed by 5 = 315,
- 315 has only odd digits, so a(10000) = 315.
		

Crossrefs

See A329249, A329424 and A329428 for similar sequences.

Programs

Formula

a(n) <= n with equality iff n = 0 or n belongs to A014261.
a(2*n) = a(n).
a(10*k + v) = 10*a(k) + v for any k >= 0 and v in {1, 3, 5, 7, 9}.
a(n) = 1 iff n is a power of 2.
a(n) = 3 iff n belongs to A007283.
a(n) = 5 iff n belongs to A020714.
a(n) = 7 iff n belongs to A005009.
a(n) = 9 iff n belongs to A005010.
a(n) = a(n+1) iff n belongs to A215145.

A216257 a(n) = 840*n^2 - 23100*n + 86861.

Original entry on oeis.org

86861, 64601, 44021, 25121, 7901, -7639, -21499, -33679, -44179, -52999, -60139, -65599, -69379, -71479, -71899, -70639, -67699, -63079, -56779, -48799, -39139, -27799, -14779, -79, 16301, 34361, 54101, 75521, 98621, 123401, 149861, 178001, 207821, 239321, 272501
Offset: 0

Views

Author

Arkadiusz Wesolowski, Mar 15 2013

Keywords

Comments

|a(n)| are distinct primes for 0 <= n <= 32.
The values of this polynomial are never divisible by a prime less than 79.
All terms are congruent to 1 (mod 20).

Crossrefs

Programs

  • Magma
    [ 840*n^2-23100*n+86861 : n in [0..34]];
    
  • Maple
    seq(840*n^2-23100*n+86861, n=0..34);
  • Mathematica
    Table[840*n^2 - 23100*n + 86861, {n, 0, 34}]
  • PARI
    for(n=0, 34, print1(840*n^2-23100*n+86861, ", "))

Formula

G.f.: (86861 - 195982*x + 110801*x^2)/(1-x)^3.
From Elmo R. Oliveira, Feb 10 2025: (Start)
E.g.f.: exp(x)*(86861 - 22260*x + 840*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
Showing 1-5 of 5 results.