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

A123229 Triangle read by rows: T(n, m) = n - (n mod m).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 6, 6, 6, 4, 5, 6, 7, 6, 6, 4, 5, 6, 7, 8, 8, 6, 8, 5, 6, 7, 8, 9, 8, 9, 8, 5, 6, 7, 8, 9, 10, 10, 9, 8, 10, 6, 7, 8, 9, 10, 11, 10, 9, 8, 10, 6, 7, 8, 9, 10, 11, 12, 12, 12, 12, 10, 12, 7, 8, 9, 10, 11, 12, 13, 12, 12, 12, 10, 12, 7, 8, 9, 10, 11, 12, 13
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 06 2006

Keywords

Comments

An equivalent definition: Consider A000012 as a lower-left all-1's triangle, and build the matrix product by multiplication with A127093 from the right. That is, T(n,m) = Sum_{j=m..n} A000012(n,j)*A127093(j,m) = Sum_{j=m..n} A127093(j,m) = m*floor(n/m) = m*A010766(n,m). - Gary W. Adamson, Jan 05 2007
The number of parts k in the triangle is A000203(k) hence the sum of parts k is A064987(k). - Omar E. Pol, Jul 05 2014

Examples

			Triangle begins:
{1},
{2, 2},
{3, 2, 3},
{4, 4, 3, 4},
{5, 4, 3, 4, 5},
{6, 6, 6, 4, 5, 6},
{7, 6, 6, 4, 5, 6, 7},
{8, 8, 6, 8, 5, 6, 7, 8},
{9, 8, 9, 8, 5, 6, 7, 8, 9},
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..10],n->List([1..n],m->n-(n mod m)))); # Muniru A Asiru, Oct 12 2018
  • Maple
    seq(seq(n-modp(n,m),m=1..n),n=1..13); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    a = Table[Table[n - Mod[n, m], {m, 1, n}], {n, 1, 20}]; Flatten[a]
  • PARI
    for(n=1,9,for(m=1,n,print1(n-n%m", "))) \\ Charles R Greathouse IV, Nov 07 2011
    

Extensions

Edited by N. J. A. Sloane, Jul 05 2014 at the suggestion of Omar E. Pol, who observed that A127095 (Gary W. Adamson, with edits by R. J. Mathar) was the same as this sequence.

A288913 a(n) = Lucas(4*n + 3).

Original entry on oeis.org

4, 29, 199, 1364, 9349, 64079, 439204, 3010349, 20633239, 141422324, 969323029, 6643838879, 45537549124, 312119004989, 2139295485799, 14662949395604, 100501350283429, 688846502588399, 4721424167835364, 32361122672259149, 221806434537978679, 1520283919093591604
Offset: 0

Views

Author

Bruno Berselli, Jun 19 2017

Keywords

Comments

a(n) mod 4 gives A101000.

Crossrefs

Cf. A033891: fourth quadrisection of A000045.
Partial sums are in A081007 (after 0).
Positive terms of A098149, and subsequence of A001350, A002878, A016897, A093960, A068397.
Quadrisection of A000032: A056854 (first), A056914 (second), A246453 (third, without 11), this sequence (fourth).

Programs

  • Magma
    [Lucas(4*n + 3): n in [0..30]]; // G. C. Greubel, Dec 22 2017
    
  • Mathematica
    LucasL[4 Range[0, 21] + 3]
    LinearRecurrence[{7,-1}, {4,29}, 30] (* G. C. Greubel, Dec 22 2017 *)
  • PARI
    Vec((4 + x)/(1 - 7*x + x^2) + O(x^30)) \\ Colin Barker, Jun 20 2017
    
  • Python
    from sympy import lucas
    def a(n):  return lucas(4*n + 3)
    print([a(n) for n in range(22)]) # Michael S. Branicky, Apr 29 2021
  • Sage
    def L():
        x, y = -1, 4
        while True:
            yield y
            x, y = y, 7*y - x
    r = L(); [next(r) for  in (0..21)] # _Peter Luschny, Jun 20 2017
    

Formula

G.f.: (4 + x)/(1 - 7*x + x^2).
a(n) = 7*a(n-1) - a(n-2) for n>1, with a(0)=4, a(1)=29.
a(n) = ((sqrt(5) + 1)^(4*n + 3) - (sqrt(5) - 1)^(4*n + 3))/(8*16^n).
a(n) = Fibonacci(4*n+4) + Fibonacci(4*n+2).
a(n) = 4*A004187(n+1) + A004187(n).
a(n) = 5*A003482(n) + 4 = 5*A081016(n) - 1.
a(n) = A002878(2*n+1) = A093960(2*n+3) = A001350(4*n+3) = A068397(4*n+3).
a(n+1)*a(n+k) - a(n)*a(n+k+1) = 15*Fibonacci(4*k). Example: for k=6, a(n+1)*a(n+6) - a(n)*a(n+7) = 15*Fibonacci(24) = 695520.

A382173 a(n) is the sum of row n of A382172.

Original entry on oeis.org

0, 1, 2, 1, 6, 7, 4, 2, 6, 16, 1, 5, 8, 14, 10, 5, 10, 6, 3, 15, 2, 7, 13, 4, 26, 24, 19, 9, 1, 31, 6, 10, 8, 10, 20, 4, 22, 2, 13, 14, 11, 11, 24, 5, 31, 13, 8, 4, 30, 80, 17, 20, 30, 18, 2, 11, 17, 9, 14, 30, 16, 5, 10, 25, 36, 29, 38, 6, 9, 63, 16, 2, 40, 64
Offset: 1

Views

Author

Amiram Eldar, Mar 17 2025

Keywords

Comments

The sum of digits (or, equivalently, the number of 1's) of the period of 1/n when expanded in golden ratio base.

Examples

			The first 5 terms and the corresponding rows of A382172 are:
  n | a(n) | row n
 ---+------+-----------------------------------------------------------
  1 |    0 | 0
  2 |    1 | 0, 1, 0
  3 |    2 | 0, 0, 1, 0, 1, 0, 0, 0
  4 |    1 | 0, 0, 1, 0, 0, 0
  5 |    6 | 0, 0, 0 ,1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[RealDigits[1/n, GoldenRatio, A001175[n], -1][[1]]]; Array[a, 100] (* using A001175[n] from A001175 *)
Showing 1-3 of 3 results.