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

A185620 Triangular matrix T that satisfies: T^3 - T^2 + I = SHIFT_LEFT(T), as read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 10, 5, 1, 1, 1, 42, 27, 7, 1, 1, 1, 226, 173, 52, 9, 1, 1, 1, 1525, 1330, 442, 85, 11, 1, 1, 1, 12555, 12134, 4345, 897, 126, 13, 1, 1, 1, 123098, 129359, 49114, 10687, 1586, 175, 15, 1, 1, 1, 1408656, 1587501, 632104, 143335, 22156, 2557
Offset: 0

Views

Author

Paul D. Hanna, Feb 01 2011

Keywords

Examples

			Triangle T begins:
1;
1, 1;
1, 1, 1;
1, 3, 1, 1;
1, 10, 5, 1, 1;
1, 42, 27, 7, 1, 1;
1, 226, 173, 52, 9, 1, 1;
1, 1525, 1330, 442, 85, 11, 1, 1;
1, 12555, 12134, 4345, 897, 126, 13, 1, 1;
1, 123098, 129359, 49114, 10687, 1586, 175, 15, 1, 1;
1, 1408656, 1587501, 632104, 143335, 22156, 2557, 232, 17, 1, 1;
1, 18499835, 22127494, 9167575, 2149761, 343091, 40936, 3858, 297, 19, 1, 1; ...
Matrix square T^2 begins:
1;
2, 1;
3, 2, 1;
6, 7, 2, 1;
18, 28, 11, 2, 1;
79, 142, 66, 15, 2, 1;
463, 913, 470, 120, 19, 2, 1;
3396, 7244, 3997, 1098, 190, 23, 2, 1;
...
Matrix cube T^3 begins:
1;
3, 1;
6, 3, 1;
16, 12, 3, 1;
60, 55, 18, 3, 1;
305, 315, 118, 24, 3, 1;
1988, 2243, 912, 205, 30, 3, 1;
15951, 19378, 8342, 1995, 316, 36, 3, 1;
...
Thus T^3 - T^2 + I begins:
1;
1, 1;
3, 1, 1;
10, 5, 1, 1;
42, 27, 7, 1, 1;
226, 173, 52, 9, 1, 1;
1525, 1330, 442, 85, 11, 1, 1;
12555, 12134, 4345, 897, 126, 13, 1, 1;
...
which equals T shifted left one column.
...
ALTERNATE GENERATING FORMULA.
Let U equal T shifted up one diagonal:
1;
1, 1;
1, 3, 1;
1, 10, 5, 1;
1, 42, 27, 7, 1;
1, 226, 173, 52, 9, 1;
1, 1525, 1330, 442, 85, 11, 1;
1, 12555, 12134, 4345, 897, 126, 13, 1;
...
then U*T^2 begins:
1;
3, 1;
10, 5, 1;
42, 27, 7, 1;
226, 173, 52, 9, 1;
1525, 1330, 442, 85, 11, 1;
12555, 12134, 4345, 897, 126, 13, 1;
...
which equals U shifted left one column.
		

Crossrefs

Cf. columns: A185621, A185622, A185623; A185624 (T^2), A185628 (T^3).
Cf. variants: A104445, A185641.

Programs

  • PARI
    {T(n, k)=local(A=Mat(1), B); for(m=1, n, B=A^3-A^2+A^0;
    A=matrix(m+1, m+1); for(i=1, m+1, for(j=1, i, if(i<2|j==i, A[i, j]=1,
    if(j==1, A[i, j]=1, A[i, j]=B[i-1, j-1]))))); return(A[n+1, k+1])}

Formula

Recurrence: T(n+1,k+1) = [T^3](n,k) - [T^2](n,k) + [T^0](n,k) for n>=k>=0, with T(n,0)=1 for n>=0.
Let U equal T shifted up one diagonal; then U*T^2 equals U shifted left one column.

A098592 Number of primes between n*30 and (n+1)*30.

Original entry on oeis.org

10, 7, 7, 6, 5, 6, 5, 6, 5, 5, 4, 6, 5, 4, 6, 5, 5, 2, 5, 5, 5, 6, 4, 4, 4, 5, 3, 6, 4, 4, 4, 4, 4, 5, 5, 4, 6, 3, 3, 4, 5, 4, 4, 6, 2, 3, 3, 5, 4, 7, 2, 5, 4, 6, 3, 4, 4, 3, 4, 4, 3, 2, 7, 3, 3, 3, 5, 5, 3, 5, 3, 5, 2, 3, 4, 4, 5, 3, 4, 7, 3, 4, 3, 1, 5, 3, 3, 3, 4, 7, 5, 4, 3, 5, 3, 4, 4, 3, 4, 2, 4, 3, 5, 2, 2, 3
Offset: 0

Views

Author

Hugo Pfoertner, Sep 16 2004

Keywords

Comments

Number of nonzero bits in A098591(n).
The number a(n) is < 8 except for n=0. - Pierre CAMI, Jun 02 2009
For references to positions where a(n) = 7 and related explanation, see A100418. - Peter Munn, Sep 06 2023

Examples

			a(1)=7 because there are 7 primes in the interval (30,60): 31,37,41,43,47,53,59.
a(26)=3 because the interval of length 30 following 26*30=780 contains 3 primes: 787, 797 and 809.
		

Crossrefs

Cf. A000040 (prime numbers), A098591 (packed representation of the primes mod 30), A100418, A185641.

Programs

  • FORTRAN
    ! See links given in A098591.
    
  • PARI
    a(n) = primepi(30*(n+1)) - primepi(30*n); \\ Michel Marcus, Apr 04 2020
    
  • Python
    from sympy import primerange
    def a(n): return len(list(primerange(n*30, (n+1)*30)))
    print([a(n) for n in range(106)]) # Michael S. Branicky, Oct 07 2021

Extensions

Edited by N. J. A. Sloane, Jun 12 2009 at the suggestion of R. J. Mathar
Showing 1-2 of 2 results.