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

A254027 Table T(n,k) = 3^n - 2^k read by antidiagonals.

Original entry on oeis.org

0, 2, -1, 8, 1, -3, 26, 7, -1, -7, 80, 25, 5, -5, -15, 242, 79, 23, 1, -13, -31, 728, 241, 77, 19, -7, -29, -63, 2186, 727, 239, 73, 11, -23, -61, -127, 6560, 2185, 725, 235, 65, -5, -55, -125, -255, 19682, 6559, 2183, 721, 227, 49, -37, -119, -253, -511, 59048, 19681, 6557, 2179, 713, 211, 17, -101, -247, -509, -1023
Offset: 0

Views

Author

K. G. Stier, Jan 22 2015

Keywords

Comments

Table shows differences of a given power of 3 to the powers of 2 (columns), and differences of the powers of 3 to a given power of 2 (rows), respectively.
Note that positive terms (table's upper right area) and negative terms (lower left area) are separated by an imaginary line with slope -log(3)/log(2) = -1.5849625.. (see A020857). This "border zone" of the table is of interest in terms of how close powers of 3 and powers of 2 can get: i.e., those T(n,k) where k/n is a good rational approximation to log(3)/log(2), see A254351 for numerators k and respective A060528 for denominators n.

Examples

			Table begins
   0    2   8  26  80..
  -1    1   7  25  79..
  -3   -1   5  23  73..
  -7   -5   1  19  65..
  -15 -13  -7  11  49..
  ..   ..  ..  ..  ..
		

Crossrefs

Row 0 (=3^n-1) is A024023.
Row 1 (=3^n-2) is A058481.
Row 2 (=3^n-4) is A168611.
Column 0 (=1-2^n) is (-1)A000225.
Column 1 (=3-2^n) is (-1)A036563.
Column 2 (=9-2^n) is (-1)A185346.
Column 3 (=27-2^n) is (-1)A220087.
0,0-Diagonal (=3^n-2^n) is A001047.
1,0-Diagonal (=3^n-2^(n-1)) for n>0 is A083313 or A064686.
0,1-Diagonal (=3^n-2^(n+1)) is A003063.
0,2-Diagonal (=3^n-2^(n+2)) is A214091.

Programs

  • Mathematica
    Table[3^(n-k) - 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2017 *)
  • PARI
    for(i=0, 10, {
         for(j=0, i, print1((3^(i-j)-2^j),", "))
    });

A076217 a(1)=1, a(n) = a(n-1) + n * sign(n-a(n-1)).

Original entry on oeis.org

1, 3, 3, 7, 2, 8, 1, 9, 9, 19, 8, 20, 7, 21, 6, 22, 5, 23, 4, 24, 3, 25, 2, 26, 1, 27, 27, 55, 26, 56, 25, 57, 24, 58, 23, 59, 22, 60, 21, 61, 20, 62, 19, 63, 18, 64, 17, 65, 16, 66, 15, 67, 14, 68, 13, 69, 12, 70, 11, 71, 10, 72, 9, 73, 8, 74, 7, 75, 6, 76, 5, 77, 4, 78, 3, 79, 2, 80
Offset: 1

Views

Author

Benoit Cloitre, Nov 03 2002

Keywords

Comments

a(n) = 1 correspond to n = A058481(m). - Bill McEachen, Aug 31 2023

Examples

			a(2) = a(1)+sign(2-a(1))*2 = 1 + 2 = 3.
		

Crossrefs

Programs

  • Haskell
    a076217 n = a076217_list !! (n-1)
    a076217_list = 1 : zipWith (+) a076217_list
       (zipWith (*) [2..] $ map a057427 $ zipWith (-) [2..] a076217_list)
    -- Reinhard Zumkeller, Apr 21 2013
    
  • Mathematica
    RecurrenceTable[{a[1]==1,a[n]==a[n-1]+n Sign[n-a[n-1]]},a[n],{n,80}] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    alist(N) = my(r, t=0); vector(N, i, t=r=t+i*sign(i-t)); \\ Ruud H.G. van Tol, May 10 2024

Formula

If 3^n>2*m>= 2*3^(n-1); a(3^n-2*m) = m; if 3^n>2*m+1>=2*3^(n-1)+1 a(3^n-2*m-1) = 3^n - m; special case of partial sum: sum(k=1, 3^n, a(k)) = (3/8)*(9^n-1) + (3^(n+1)-1)/2.
Conjecture: a(n) = -a(n-1)+a(n-2)+a(n-3) for n>5. G.f.: -x*(27*x^28 +54*x^27 +27*x^26 +9*x^10 +18*x^9 +9*x^8 +3*x^4 +6*x^3 +5*x^2 +4*x +1) / ((x -1)*(x +1)^2). - Colin Barker, Feb 25 2013
Regarding Barker's conjectured recurrence, it seems to fail at n= powers of 3, and the 2 successive terms. So it holds except for n= 9-11, 27-29, 81-83, 243-245, .... - Bill McEachen, Mar 21 2025

A112027 a(1)=1; then successively add 1, divide by 2, add 2 and then total up the last 4 terms.

Original entry on oeis.org

1, 2, 1, 3, 7, 8, 4, 6, 25, 26, 13, 15, 79, 80, 40, 42, 241, 242, 121, 123, 727, 728, 364, 366, 2185, 2186, 1093, 1095, 6559, 6560, 3280, 3282, 19681, 19682, 9841, 9843, 59047, 59048, 29524, 29526, 177145, 177146, 88573, 88575, 531439, 531440, 265720, 265722, 1594321
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2005

Keywords

References

  • Joshua Zucker, Posting to Seq Fan mailing list, Nov 24 2005

Crossrefs

Quadrusections: A058481, A024023, A003462, A067771.

Programs

  • Maple
    a[1]:=1; k:=1; for n from 1 to 16 do k:=k+1; a[k]:=a[k-1]+1; k:=k+1; a[k]:=a[k-1]/2; k:=k+1; a[k]:=a[k-1]+2; k:=k+1; a[k]:=a[k-1]+a[k-2]+a[k-3]+a[k-4]; od;
  • Mathematica
    LinearRecurrence[{0, 0, 0, 4, 0, 0, 0, -3}, {1, 2, 1, 3, 7, 8, 4, 6}, 50] (* Paolo Xausa, May 20 2024 *)

Formula

G.f.: -x*(6*x^7-3*x^4-3*x^3-x^2-2*x-1) / ((x-1)*(x+1)*(x^2+1)*(3*x^4-1)). - Colin Barker, Jul 28 2013

Extensions

Definition found by Franklin T. Adams-Watters, Feb 01 2006
More terms from N. J. A. Sloane, Feb 22 2006

A137215 a(n) = 3*(10^n) + (n^2 + 1)*(10^n - 1)/9.

Original entry on oeis.org

3, 32, 355, 4110, 48887, 588886, 7111107, 85555550, 1022222215, 12111111102, 142222222211, 1655555555542, 19111111111095, 218888888888870, 2488888888888867, 28111111111111086, 315555555555555527, 3522222222222222190, 39111111111111111075, 432222222222222222182
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 06 2008

Keywords

Comments

Sequence generalized: a(n) = a(0)*(B^n) + F(n)* ((B^n)-1)/(B-1); a(0), B integers, F(n) arithmetic function.
Examples:
a(0) = 1, B = 10, F(n) = 1 gives A002275, F(n) = 2 gives A090843, F(n) = 3 gives A097166, F(n) = 4 gives A099914, F(n) = 5 gives A099915.
a(0) = 1, B = 2, F(n) = 1 gives A000225, F(n) = 2 gives A033484, F(n) = 3 gives A036563, F(n) = 4 gives A048487, F(n) = 5 gives A048488, F(n) = 6 gives A048489.
a(0) = 1, B = 3, F(n) = 1 gives A003462, F(n) = 2 gives A048473, F(n) = 3 gives A134931, F(n) = 4 gives A058481, F(n) = 5 gives A116952.
a(0) = 1, B = 4, F(n) = 1 gives A002450, F(n) = 2 gives A020989, F(n) = 3 gives A083420, F(n) = 4 gives A083597, F(n) = 5 gives A083584.
a(0) = 1, B = 5, F(n) = 1 gives A003463, F(n) = 2 gives A057651, F(n) = 3 gives A117617, F(n) = 4 gives A081655.
a(0) = 2, B = 10, F(n) = 1 gives A037559, F(n) = 2 gives A002276.

Examples

			a(3) = 3*10^3 + (3*3 + 1)*(10^3 - 1)/9 = 4110.
		

Crossrefs

Programs

  • Mathematica
    Table[3*10^n +(n^2 +1)*(10^n -1)/9, {n,0,30}] (* G. C. Greubel, Jan 05 2022 *)
  • PARI
    a(n) = 3*(10^n) + (n*n+1)*((10^n)-1)/9; \\ Jinyuan Wang, Feb 27 2020
    
  • Sage
    [3*10^n +(1+n^2)*(10^n -1)/9 for n in (0..30)] # G. C. Greubel, Jan 05 2022

Formula

a(n) = 3*(10^n) + (n^2 + 1)*(10^n - 1)/9.
O.g.f.: (3 - 67*x + 478*x^2 - 1002*x^3 + 850*x^4 - 100*x^5)/((1-x)^3 * (1-10*x)^3). - R. J. Mathar, Mar 16 2008

Extensions

More terms from R. J. Mathar, Mar 16 2008
More terms from Jinyuan Wang, Feb 27 2020

A282179 E.g.f.: exp(exp(x) - 1)*(exp(3*x) - 2*exp(x) + 1).

Original entry on oeis.org

0, 1, 9, 52, 283, 1561, 8930, 53411, 334785, 2199034, 15119621, 108644581, 814474176, 6358910949, 51615342685, 434865155292, 3796991928727, 34308796490005, 320379418256794, 3087939032182127, 30683582797977749, 313977721545709002, 3305220440084030809, 35759627532783842561
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 08 2017

Keywords

Comments

Stirling transform of the cubes (A000578).
Exponential convolution of the sequences A000110 and A058481 (with a(0) = 0).

Examples

			E.g.f.: A(x) = x/1! + 9*x^2/2! + 52*x^3/3! + 283*x^4/4! + 1561*x^5/5! + 8930*x^6/6! + ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0,
           m^3, m*b(n-1, m)+b(n-1, m+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..27);  # Alois P. Heinz, Jul 15 2022
  • Mathematica
    Range[0, 23]! CoefficientList[Series[Exp[Exp[x] - 1] (Exp[3 x] - 2 Exp[x] + 1), {x, 0, 23}], x]
    Table[Sum[StirlingS2[n, k] k^3, {k, 0, n}], {n, 0, 23}]
    Table[Sum[Binomial[n, k] BellB[n-k] (3^k - 2), {k, 1, n}], {n, 0, 23}]
    Table[BellB[n+3] - 3*BellB[n+2] + BellB[n], {n, 0, 23}] (* Vaclav Kotesovec, Aug 06 2021 *)

Formula

a(n) = Sum_{k=0..n} Stirling2(n,k)*A000578(k).
a(n) = A000110(n) + A005494(n) - A186021(n+1).

A238339 Square number array read by ascending antidiagonals: T(1,k) = 2*k + 1, and T(n,k) = (2*n^(k+1)-n-1)/(n-1) otherwise.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 13, 7, 1, 1, 9, 25, 29, 9, 1, 1, 11, 41, 79, 61, 11, 1, 1, 13, 61, 169, 241, 125, 13, 1, 1, 15, 85, 311, 681, 727, 253, 15, 1, 1, 17, 113, 517, 1561, 2729, 2185, 509, 17, 1, 1, 19, 145, 799, 3109, 7811, 10921, 6559, 1021, 19, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2014

Keywords

Examples

			Square array begins:
1..1...1.....1......1.......1........1........1...
1..3...5.....7......9......11.......13.......15...
1..5..13....29.....61.....125......253......509...
1..7..25....79....241.....727.....2185.....6559...
1..9..41...169....681....2729....10921....43689...
1.11..61...311...1561....7811....39061...195311...
1.13..85...517...3109...18661...111973...671845...
1.15.113...799...5601...39215...274513..1921599...
1.17.145..1169...9361...74897...599185..4793489...
1.19.181..1639..14761..132859..1195741.10761679...
1.21.221..2221..22221..222221..2222221.22222221...
		

Crossrefs

Cf. A238303.

Programs

  • Maple
    T:= proc(n, k); if n=1 then 2*k+1 else (2*n^(k+1)-n-1)/(n-1) fi end:
    seq(seq(T(n-k, k), k=0..n), n=0..10); # Georg Fischer, Oct 14 2023

Formula

T(0,k) = A000012(k) = 1;
T(1,k) = A005408(k) = 2k+1;
T(2,k) = A036563(k+2);
T(3,k) = A058481(k+1);
T(4,k) = A083584(k);
T(5,k) = A137410(k);
T(6,k) = A233325(k);
T(7,k) = A233326(k);
T(8,k) = A233328(k);
T(9,k) = A211866(k+1);
T(10,k) = A165402(k+1);
T(n,0) = A000012(n) = 1;
T(n,1) = A005408(n) = 2*n+1;
T(n,2) = A001844(n) = 2*n^2 + 2*n + 1.

Extensions

Definition amended by Georg Fischer, Oct 14 2023

A337837 Numbers k such that Omega(3^k - 2) = Omega(3^k + 2) where Omega is A001222.

Original entry on oeis.org

2, 4, 12, 18, 20, 28, 30, 31, 34, 35, 38, 44, 45, 49, 50, 58, 60, 75, 79, 97, 100, 103, 111, 113, 118, 120, 135, 141, 153, 154, 156, 166, 168, 171, 178, 181, 204, 219, 220, 239, 245, 247, 254, 260, 267, 269, 280, 286, 298, 307, 313
Offset: 1

Views

Author

Zak Seidov, Sep 25 2020

Keywords

Comments

The corresponding values of Omega: 1, 1, 2, 3, 2, 2, 3, 3, 3, 3, 4, 2, 3, 3, 3, 3, 2, 6, 5, 4, 3, 4, 4, 4, 2, 4, 3, 3, 7, 4, 2, 4, 4, 4, 4, 5, 5, 5, 3, 5, 5, 6, 5, 6, 4, 5, 4, 5, 7, 6, 8.

Examples

			2 is a term since Omega(3^2 - 2) = Omega(7) = 1, and Omega(3^2 + 2) = Omega(11) = 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeOmega[3^#-2] == PrimeOmega[3^#+2]&]
  • PARI
    for (k = 1, 200, if ((m = bigomega (3^k - 2)) == bigomega (3^k + 2), print (k ", " m ", ")))

Extensions

a(36)-a(51) from Amiram Eldar, Sep 25 2020
Previous Showing 21-27 of 27 results.