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

A166918 Triangle T(n,k) read by rows: T(n,0) = n mod 2. T(n,k) = 2^(k-1), 0

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 1, 1, 2, 4, 0, 1, 2, 4, 8, 1, 1, 2, 4, 8, 16, 0, 1, 2, 4, 8, 16, 32, 1, 1, 2, 4, 8, 16, 32, 64, 0, 1, 2, 4, 8, 16, 32, 64, 128, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024
Offset: 0

Views

Author

Paul Curtz, Oct 23 2009

Keywords

Examples

			0;
1,1;
0,1,2;
1,1,2,4;
0,1,2,4,8;
1,1,2,4,8,16;
0,1,2,4,8,16,32;
1,1,2,4,8,16,32,64;
		

Crossrefs

Programs

  • Mathematica
     t[n_, 0] := Mod[n, 2]; t[n_, k_] := 2^(k - 1); Table[ t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten

Formula

T(2n,k) = A131577(k). T(2n+1,k) = A011782(k).
sum_{k=0..n} T(n,k) = A166920(n).

A233757 Triangle read by rows: T(n,k) = (2^n-1)*2^(k-1), for n >= 1 and 1<=k<=n.

Original entry on oeis.org

1, 3, 6, 7, 14, 28, 15, 30, 60, 120, 31, 62, 124, 248, 496, 63, 126, 252, 504, 1008, 2016, 127, 254, 508, 1016, 2032, 4064, 8128, 255, 510, 1020, 2040, 4080, 8160, 16320, 32640, 511, 1022, 2044, 4088, 8176, 16352, 32704, 65408, 130816, 1023, 2046, 4092
Offset: 1

Views

Author

Omar E. Pol, Jan 12 2014

Keywords

Comments

Column 1 gives the positive terms of A000225.
Leading diagonal gives the positive terms of A006516.
The sum of row n is T(n,1)^2 = A000225(n)^2, hence row sums give A060867.
If n = A000043(m) then T(n,1) = A000668(m) and row n lists last n divisors of m-th even perfect number, which are also the divisors that are multiples of m-th Mersenne prime, for m >= 1.
If n = A000043(m) then T(n,n) = A000396(m), assuming there are no odd perfect numbers, for m >= 1.

Examples

			Triangle begins:
1;
3, 6;
7, 14, 28;
15, 30, 60, 120;
31, 62, 124, 248, 496;
63, 126, 252, 504, 1008, 2016;
127, 254, 508, 1016, 2032, 4064, 8128;
255, 510, 1020, 2040, 4080, 8160, 16320, 32640;
511, 1022, 2044, 4088, 8176, 16352, 32704, 65408, 130816;
...
		

Crossrefs

Programs

  • Mathematica
    Table[(2^n-1)2^(k-1),{n,10},{k,n}]//Flatten (* Harvey P. Dale, Oct 10 2018 *)

Formula

T(n,k) = A000225(n)*A000079(k-1), n >= 1, 1<=k<=n.

A245235 Repeat 2^(n*(n+1)/2) n+1 times.

Original entry on oeis.org

1, 2, 2, 8, 8, 8, 64, 64, 64, 64, 1024, 1024, 1024, 1024, 1024, 32768, 32768, 32768, 32768, 32768, 32768, 2097152, 2097152, 2097152, 2097152, 2097152, 2097152, 2097152, 268435456, 268435456, 268435456, 268435456, 268435456, 268435456, 268435456, 268435456
Offset: 0

Views

Author

Paul Curtz, Jul 14 2014

Keywords

Comments

For a(n), the successive exponents of 2 are 0, 1, 1, 3, 3, 3,... = A057944(n).

Examples

			n+1 times repeated 2^(n*(n+1)/2)= 1, 2, 8, 64, 1024,... = A139685(n).
By the formula: a(0)=1/1=1, a(1)=2/1=2, a(2)=4/2=2, a(3)=8/1=8, a(4)=16/2=8,...
As triangle:
   1,
   2,    2,
   8,    8,    8,
  64,   64,   64,   64,
1024, 1024, 1024, 1024, 1024,
etc.
Row sums: 1, 4, 24, 256,... = A095340.
		

Crossrefs

Programs

  • Mathematica
    Table[2^(n*(n+1)/2), {n, 0, 7}, {n+1}] // Flatten (* Jean-François Alcover, Jul 15 2014 *)
  • Python
    from math import isqrt
    def A245235(n): return 1<<((m:=isqrt(n+1<<3)-1>>1)*(m+1)>>1) # Chai Wah Wu, Dec 17 2024

Formula

a(n) = 2^n/A059268(n).
T(n, k) = 2^(n*(n+1)/2), 0 <= k <= n. - Michel Marcus, Jul 17 2014

A288492 Indices of terms of A288349 that are powers of 2.

Original entry on oeis.org

1, 2, 3, 18, 95, 440, 1897, 7882, 32139, 129804, 521741, 2092046, 8378383, 33533968, 134176785, 536789010, 2147319827, 8589606932, 34359083029, 137437642774, 549753192471, 2199018012696, 8796082536473, 35184351117338, 140737446412315, 562949869535260
Offset: 1

Views

Author

Zhining Yang, Jun 10 2017

Keywords

Comments

The sequence is derived from Chinese 2017 college entrance examination mathematics questions.

Examples

			a(4) = 18 means the 18th element of the sum of the concatenate subsequences [2^0, 2^1, ..., 2^k] = 1+1+2+1+2+4+1+2+4+8+1+2+4+8+16+1+2+4 = 64, and 64 is power of 2.
		

Crossrefs

Programs

  • Mathematica
    Position[Accumulate@ Flatten@ Array[2^Range[0, #] &, 2000, 0], k_ /; IntegerQ@ Log2@ k][[All, 1]] (* per Name, or *)
    Table[2 - 5*2^(n - 2) + 2^(2 n - 3) + n + Boole[n == 2], {n, 26}] (* or *)
    LinearRecurrence[{8, -21, 22, -8}, {1, 2, 3, 18, 95, 440}, 26] (* or *)
    Rest@ CoefficientList[Series[x (1 - 6 x + 8 x^2 + 14 x^3 - 22 x^4 + 8 x^5)/((1 - x)^2*(1 - 2 x) (1 - 4 x)), {x, 0, 26}], x] (* Michael De Vlieger, Jun 19 2017 *)
  • PARI
    for(k=0,100,p=(2^k-3)*(2^k-2)/2+k; print1(p, ", "))
    
  • PARI
    ispower2(n) = (n==1) || (n==2) || (ispower(n,,&two) && (two==2));
    lista(nn) = select(x->ispower2(x), vector(nn, n, t=floor(sqrt(2*n)+1/2); 2^t+2^(n-t*(t-1)/2)-t-2), 1); \\ Michel Marcus, Jun 20 2017
    
  • PARI
    Vec(x*(1 - 6*x + 8*x^2 + 14*x^3 - 22*x^4 + 8*x^5) / ((1 - x)^2*(1 - 2*x)*(1 - 4*x)) + O(x^30)) \\ Colin Barker, Jun 23 2017

Formula

From Colin Barker, Jun 23 2017: (Start)
G.f.: x*(1 - 6*x + 8*x^2 + 14*x^3 - 22*x^4 + 8*x^5) / ((1 - x)^2*(1 - 2*x)*(1 - 4*x)).
a(n) = 2 - 5*2^(n-2) + 2^(2*n-3) + n for n>2.
a(n) = 8*a(n-1) - 21*a(n-2) + 22*a(n-3) - 8*a(n-4) for n>6.
(End)

A385178 Triangle T(n,k) read by rows in which the n-th diagonal lists the n-th differences of A001047, 0 <= k <= n.

Original entry on oeis.org

0, 1, 1, 3, 4, 5, 7, 10, 14, 19, 15, 22, 32, 46, 65, 31, 46, 68, 100, 146, 211, 63, 94, 140, 208, 308, 454, 665, 127, 190, 284, 424, 632, 940, 1394, 2059, 255, 382, 572, 856, 1280, 1912, 2852, 4246, 6305, 511, 766, 1148, 1720, 2576, 3856, 5768, 8620, 12866, 19171
Offset: 0

Views

Author

Paul Curtz, Jun 20 2025

Keywords

Examples

			Triangle begins:
    0;
    1,   1;
    3,   4,    5;
    7,  10,   14,   19;
   15,  22,   32,   46,   65;
   31,  46,   68,  100,  146,  211;
   63,  94,  140,  208,  308,  454,  665;
  127, 190,  284,  424,  632,  940, 1394, 2059;
  255, 382,  572,  856, 1280, 1912, 2852, 4246,  6305;
  511, 766, 1148, 1720, 2576, 3856, 5768, 8620, 12866, 19171;
  ...
		

Crossrefs

Columns k=0..2: A000225, A033484, A053209 (sans 1).
Diagonals: A001047, A027649, A053581 (sans 1), A291012 (sans 2).

Programs

  • Magma
    /* As triangle */ [[2^(n-k)*3^k - 2^k : k in [0..n]]: n in [0..9]]; // Vincenzo Librandi, Jun 27 2025
  • Maple
    T:= proc(n,k) option remember;
         `if`(n=k, 3^n-2^n, T(n, k+1)-T(n-1, k))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Jun 24 2025
  • Mathematica
    t[n_, 0] := 3^n - 2^n; t[n_, k_] := t[n, k] = t[n + 1, k - 1] - t[n, k - 1]; Table[t[k, n - k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, Jun 20 2025 *)

Formula

T(n,n) = 3^n - 2^n = A001047(n).
T(n,k) = T(n,k+1) - T(n-1,k) for 0 <= k < n.
T(n,k) = 2^(n-k)*3^k - 2^k = A036561(n,k) - A059268(n,k).
T(2n,n) = A248216(n+1).
Previous Showing 21-25 of 25 results.