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

A060816 a(0) = 1; a(n) = (5*3^(n-1) - 1)/2 for n > 0.

Original entry on oeis.org

1, 2, 7, 22, 67, 202, 607, 1822, 5467, 16402, 49207, 147622, 442867, 1328602, 3985807, 11957422, 35872267, 107616802, 322850407, 968551222, 2905653667, 8716961002, 26150883007, 78452649022, 235357947067, 706073841202
Offset: 0

Views

Author

Jason Earls, Apr 29 2001

Keywords

Comments

From Erich Friedman's math magic page 2nd paragraph under "Answers" section.
Let A be the Hessenberg matrix of order n, defined by: A[1,j] = 1, A[i,i] = 2,(i>1), A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n) = (-1)^n*charpoly(A,-1). - Milan Janjic, Jan 26 2010
If n > 0 and H = hex number (A003215), then 9*H(a(n)) - 2 = H(a(n+1)), for example 9*H(2) - 2 = 9*19 - 2 = 169 = H(7). For n > 2, this is a subsequence of A017209, see formula. - Klaus Purath, Mar 31 2021
Consider the Tower of Hanoi puzzle of order n (i.e., with n rings to be moved). Label each ring with a distinct symbol from an alphabet of size n. Construct words by performing moves according to the standard rules of the puzzle, recording the corresponding symbol each time a ring is moved. To ensure finiteness, we forbid returning to any previously encountered state. Additionally, we impose the constraint that the same ring cannot be moved twice in succession. Then, a(n) is the number of distinct words that can be formed under these rules. - Thomas Baruchel, Jul 22 2025

Crossrefs

Cf. A005030 (first differences), A244762 (partial sums).

Programs

Formula

The following is a summary of formulas added over the past 18 years.
a(n) = A057198(n) - 1.
a(n) = 3*a(n-1) + 1; with a(0)=1, a(1)=2. - Jason Earls, Apr 29 2001
From Henry Bottomley, May 01 2001: (Start)
For n>0, a(n) = a(n-1)+5*3^(n-2) = a(n-1)+A005030(n-2).
For n>0, a(n) = (5*A003462(n)+1)/3. (End)
From Colin Barker, Apr 24 2012: (Start)
a(n) = 4*a(n-1) - 3*a(n-2) for n > 2.
G.f.: (1-2*x+2*x^2)/((1-x)*(1-3*x)). (End)
a(n+1) = A134931(n) + 1. - Philippe Deléham, Apr 14 2013
For n > 0, A008343(a(n)) = 0. - Dmitry Kamenetsky, Feb 14 2017
For n > 0, a(n) = floor(3^n*5/6). - M. F. Hasler, Apr 06 2019
From Klaus Purath, Mar 31 2021: (Start)
a(n) = A017209(a(n-2)), n > 2.
a(n) = 2 + Sum_{i = 0..n-2} A005030(i).
a(n+1)*a(n+2) = a(n)*a(n+3) + 20*3^n, n > 1.
a(n) = 3^n - A007051(n-1). (End)
E.g.f.: (5*exp(3*x) - 3*exp(x) + 4)/6. - Stefano Spezia, Aug 28 2023

Extensions

Edited by M. F. Hasler, Apr 06 2019 and by N. J. A. Sloane, Apr 09 2019

A134931 a(n) = (5*3^n-3)/2.

Original entry on oeis.org

1, 6, 21, 66, 201, 606, 1821, 5466, 16401, 49206, 147621, 442866, 1328601, 3985806, 11957421, 35872266, 107616801, 322850406, 968551221, 2905653666, 8716961001, 26150883006, 78452649021, 235357947066, 706073841201, 2118221523606
Offset: 0

Views

Author

Rolf Pleisch, Jan 29 2008

Keywords

Comments

Numbers n where the recurrence s(0)=1, if s(n-1) >= n then s(n) = s(n-1) - n else s(n) = s(n-1) + n produces s(n)=0. - Hugo Pfoertner, Jan 05 2012
A046901(a(n)) = 1. - Reinhard Zumkeller, Jan 31 2013
Binomial transform of A146523: (1, 5, 10, 20, 40, ...) and double binomial transform of A010685: (1, 4, 1, 4, 1, 4, ...). - Gary W. Adamson, Aug 25 2016
Also the number of maximal cliques in the (n+1)-Hanoi graph. - Eric W. Weisstein, Dec 01 2017
a(n) is the least k such that f(a(n-1)+1) + ... + f(k) > f(a(n-2)+1) + ... + f(a(n-1)) for n > 1, where f(n) = 1/(n+1). Because Sum_{k=1..5*3^(n-1)} 1/(a(n)+3*k-1) + 1/(a(n)+3*k) + 1/(a(n)+3*k+1) - 1/((a(n)+1+5*3^n)*5*3^(n-1)) < Sum_{k=1..5*3^(n-1)} 1/(a(n-1)+k+1) < Sum_{k=1..5*3^(n-1)} 1/(a(n)+3*k-1) + 1/(a(n)+3*k) + 1/(a(n)+3*k+1), we have 1 < 1/3 + 1/4 + ... + 1/7 < 1/8 + 1/9 + ... + 1/22 < ... . - Jinyuan Wang, Jun 15 2020

Crossrefs

Programs

Formula

a(n) = 3*(a(n-1) + 1), with a(0)=1.
From R. J. Mathar, Jan 31 2008: (Start)
O.g.f.: (5/2)/(1-3*x) - (3/2)/(1-x).
a(n) = (A005030(n) - 3)/2. (End)
a(n) = A060816(n+1) - 1. - Philippe Deléham, Apr 14 2013
E.g.f.: exp(x)*(5*exp(2*x) - 3)/2. - Stefano Spezia, Aug 28 2023

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Dec 25 2008

A200251 T(n,k)=Number of 0..k arrays x(0..n-1) of n elements with each no smaller than the sum of its previous elements modulo (k+1).

Original entry on oeis.org

2, 3, 3, 4, 6, 5, 5, 10, 12, 8, 6, 15, 26, 24, 13, 7, 21, 45, 69, 48, 21, 8, 28, 75, 135, 181, 96, 34, 9, 36, 112, 267, 405, 476, 192, 55, 10, 45, 164, 448, 951, 1215, 1252, 384, 89, 11, 55, 225, 750, 1792, 3387, 3645, 3292, 768, 144, 12, 66, 305, 1125, 3434, 7168, 12063
Offset: 1

Views

Author

R. H. Hardin Nov 15 2011

Keywords

Comments

Table starts
...2....3.....4.....5......6.......7.......8........9.......10........11
...3....6....10....15.....21......28......36.......45.......55........66
...5...12....26....45.....75.....112.....164......225......305.......396
...8...24....69...135....267.....448.....750.....1125.....1690......2376
..13...48...181...405....951....1792....3434.....5625.....9365.....14256
..21...96...476..1215...3387....7168...15724....28125....51895.....85536
..34..192..1252..3645..12063...28672...71970...140625...287570....513216
..55..384..3292.10935..42963..114688..329455...703125..1593535...3079296
..89..768..8657.32805.153015..458752.1508139..3515625..8830385..18475776
.144.1536.22765.98415.544971.1835008.6903702.17578125.48932530.110854656

Examples

			Some solutions for n=7 k=6
..1....2....4....0....1....0....4....0....1....4....2....3....1....3....3....3
..3....5....6....3....2....6....5....4....1....5....5....4....2....5....3....4
..4....5....5....6....5....6....5....6....6....2....1....0....5....6....6....1
..6....5....3....2....6....5....3....6....2....5....3....0....3....0....6....1
..2....5....6....6....0....6....4....3....5....2....5....5....4....2....5....5
..6....2....5....6....2....2....2....5....2....4....5....5....4....5....6....2
..5....4....1....3....4....4....2....5....3....3....1....3....6....1....6....5
		

Crossrefs

Column 1 is A000045(n+2)
Column 2 is A003945
Column 3 is A099234(n+1)
Column 4 is A005030(n-1)
Column 6 is A002042(n-1)
Row 2 is A000217(n+1)

Formula

Empirical: T(n,2k) = (2*k+1)*(k+1)^(n-1)

A338486 Numbers n whose symmetric representation of sigma(n) consists of 3 regions with maximum width 2.

Original entry on oeis.org

15, 35, 45, 70, 77, 91, 110, 130, 135, 143, 154, 170, 182, 187, 190, 209, 221, 225, 238, 247, 266, 286, 299, 322, 323, 350, 374, 391, 405, 418, 437, 442, 493, 494, 506, 527, 550, 551, 572, 589, 598, 638, 646, 650, 667, 682, 703, 713, 748, 754, 782, 806, 814, 836, 850
Offset: 1

Views

Author

Hartmut F. W. Hoft, Oct 30 2020

Keywords

Comments

This sequence is a subsequence of A279102. The definition of the sequence excludes squares of primes, A001248, since the 3 regions of their symmetric representation of sigma have width 1 (first column in the irregular triangle of A247687).
Table of numbers in this sequence arranged by the number of prime factors, counting multiplicities:
2 3 4 5 6 7 ...
------------------------------------------
15 45 135 405 1215 3645
35 70 225 1125 5625 ...
77 110 350 1750 8750 744795
91 130 550 2584 ... ...
143 154 572 2750 85455
187 170 650 3128 ...
209 182 748 3250
221 190 836 3496
247 238 850 3944
299 266 884 4216
... ... ... ...
1035 9585
... ...
The numbers in the first row of the table above are b(k) = 5*3^k, k>=1, (see A005030) so that infinitely many odd numbers occur outside of the first column. The central region of the symmetric representation of sigma(b(k)) contains 2*k-1 separate contiguous sections consisting of sequences of entire legs of width 2, k>=1 (see Lemma 2 in the link).
Conjecture: The combined extent of these sections in sigma(b(k)) is 2*3^(k-1) - 1 = A048473(k-1), k>=1.
Since each number n in the first column and first row has a prime factor of odd exponent a contiguous section of the symmetric representation of sigma(n) centered on the diagonal has width 2. For odd numbers n not in the first row or column in which all prime factors have even powers, such as 225 and 5625 in the second row, a contiguous section of the symmetric representation of sigma(n) centered on the diagonal has width 1 (see Lemma 1 in the link).
For each k>=3 and every prime p such that b(k-1) < 2*p < 4*b(k-2), the odd number p*b(k-1) is in the column of b(k). The two inequalities are equivalent to b(k-1) <= row(p*b(k-1)) < 2*b(k-1) ensuring that the symmetric representation of sigma(p*b(k-1)) consists of 3 regions.
45 is the only odd number in its column (see Lemma 3 in the link).
Since the factors of n = p*q satisfy 2 < p < q < 2*p the first column in the table above is a subsequence of A082663 and of A087718 (see Lemma 4 in the link). Each of the two outer regions consists of a single leg of width 1 and length (1 + p*q)/2. The center region of size p+q consists of two subparts (see A196020 & A280851) of width 1 of sizes 2*p-q and 2*q-p, respectively (see Lemma 5 in the link). The table below arranges the first column in the table above according to the length 2*p-q of their single contiguous extent of width 2 in the center region:
1 3 5 7 9 11 13 15 ...
------------------------------------------------------
15 35 187 247 143 391 2257 323
91 77 493 589 221 1363 3139 437
703 209 943 2479 551 2911 6649 713
1891 299 1537 3397 851 3901 ... 1247
2701 527 4183 8509 1643 6313 1457
... ... ... ... ... ... ....
A129521: p*q satisfies 2*p - q = 1 (excluding A129521(1)=6)
A226755: p*q satisfies 2*p - q = 3 (excluding A226755(1)=9)
Sequences with larger differences 2*p - q are not in OEIS.

Examples

			a(6) = 91 = 7*13 is in the sequence and in the 2-column of the first table since 1 < 2 < 7 < 13 = row(91) representing the 4 odd divisors 1 - 91 - 7 - 13 (see A237048) results in the following pattern for the widths of the legs (see A249223): 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2 for 3 regions with width not exceeding 2. It also is in the 1-column of the second table since it has a single area of width 2 which is 1 unit long.
a(29) = 405 = 5*3^4 is in the sequence and in the 5-column of the first table since 1 < 2 < 3 < 5 < 6 < 9 < 10 < 15 < 18 < 27 = row(405) representing the 10 odd divisors 1 - 405 - 3 - 5 - 135 - 9 - 81 - 15 - 45 - 27 results in the following pattern for the widths of the legs: 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 for 3 regions with width not exceeding 2, and 7 = 2*4 - 1 sections of width 2 in the central region.
a(35) = 506 = 2*11*23 is in the sequence since positions 1 < 4 < 11 < 23 < row(506) = 31 representing the 4 odd divisors 1 - 253 - 11 - 23 results in the following pattern for the widths of the legs: 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 for 3 regions with width not exceeding 2, with the two outer regions consisting of 3 legs of width 1, and a single area of width 2 in the central region.
		

Crossrefs

Programs

  • Mathematica
    (* Functions path and a237270 are defined in A237270 *)
    maxDiagonalLength[n_] := Max[Map[#[[1]]-#[[2]]&, Transpose[{Drop[Drop[path[n], 1], -1], path[n-1]}]]]
    a338486[m_, n_] := Module[{r, list={}, k}, For[k=m, k<=n, k++, r=a237270[k]; If[Length[r]== 3 && maxDiagonalLength[k]==2,AppendTo[list, k]]]; list]
    a338486[1, 850]

A166465 a(n) = 3*a(n-2) for n > 2; a(1) = 1, a(2) = 5.

Original entry on oeis.org

1, 5, 3, 15, 9, 45, 27, 135, 81, 405, 243, 1215, 729, 3645, 2187, 10935, 6561, 32805, 19683, 98415, 59049, 295245, 177147, 885735, 531441, 2657205, 1594323, 7971615, 4782969, 23914845, 14348907, 71744535, 43046721, 215233605, 129140163
Offset: 1

Views

Author

Klaus Brockhaus, Oct 14 2009

Keywords

Comments

Interleaving of A000244 and A005030.
Second binomial transform is A054485.
Fifth binomial transform is A153596.

Crossrefs

Cf. A000244 (powers of 3), A005030 (5*3^n), A054485, A153596, A162813.

Programs

  • Magma
    [ n le 2 select 4*n-3 else 3*Self(n-2): n in [1..35] ];
    
  • Mathematica
    LinearRecurrence[{0,3}, {1,5}, 41] (* G. C. Greubel, Jul 27 2024 *)
  • SageMath
    [3^(n/2)*(5*((n+1)%2) +sqrt(3)*(n%2))/3 for n in range(1,41)] # G. C. Greubel, Jul 27 2024

Formula

a(n) = (4 + (-1)^n) * 3^((2*n - 5 + (-1)^n)/4).
G.f.: x*(1+5*x)/(1-3*x^2).
a(n) = A162813(n-1), for n >= 2.
From G. C. Greubel, Jul 27 2024: (Start)
a(n) = (1/6)*3^(n/2)*( 5*(1+(-1)^n) + sqrt(3)*(1-(-1)^n) ).
E.g.f.: (1/3)*(sqrt(3)*sinh(sqrt(3)*x) + 10*(sinh(sqrt(3)*x/2))^2). (End)

A258597 a(n) = 13*3^n.

Original entry on oeis.org

13, 39, 117, 351, 1053, 3159, 9477, 28431, 85293, 255879, 767637, 2302911, 6908733, 20726199, 62178597, 186535791, 559607373, 1678822119, 5036466357, 15109399071, 45328197213, 135984591639, 407953774917, 1223861324751, 3671583974253, 11014751922759
Offset: 0

Views

Author

Vincenzo Librandi, Jun 05 2015

Keywords

Comments

Also maximum leaf number of the (n+3)-Apollonian network for n >= 0. - Eric W. Weisstein, Jan 17 2018

Crossrefs

Cf. k*3^n: A000244 (k=1,3,9), A008776 (k=2,6), A003946 (k=4), A005030 (k=5), A005032 (k=7), A005051 (k=8), A005052 (k=10), A120354 (k=11), A003946 (k=12), this sequence (k=13), A258598 (k=17), A176413 (k=19).

Programs

  • Magma
    [13*3^n: n in [0..30]];
  • Mathematica
    Table[13 3^n, {n, 0, 30}]
    13 3^Range[0, 20] (* Eric W. Weisstein, Jan 17 2018 *)
    LinearRecurrence[{3}, {13}, 20] (* Eric W. Weisstein, Jan 17 2018 *)
    CoefficientList[Series[13/(1 - 3 x), {x, 0, 20}], x] (* Eric W. Weisstein, Jan 17 2018 *)

Formula

G.f.: 13/(1-3*x).
a(n) = 3*a(n-1).
a(n) = 13*A000244(n).
E.g.f.: 13*exp(3*x). - Elmo R. Oliveira, Aug 16 2024

A382407 a(n) is the number of partitions n = x + y + z of positive integers such that x*y + y*z + x*z is a perfect square.

Original entry on oeis.org

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

Views

Author

Felix Huber, Apr 04 2025

Keywords

Comments

a(n) is the number of distinct cuboids with edge length 4*n whose surface area is half of a square.
Conjecture: a(k) = 0 iff k is an element of {2, 4, 8, 13} union A000244 union A005030.

Examples

			The a(14) = 3 partitions [x, y, z] are [1, 1, 12], [1, 4, 9] and [4, 4, 6] because 1*1 + 1*12 + 1*12 = 5^2, 1*4 + 4*9 + 1*9 = 7^2 and 4*4 + 4*6 + 4*6 = 8^2.
		

Crossrefs

Programs

  • Maple
    A382407:=proc(n)
        local a,x,y,z;
        a:=0;
        for x to n/3 do
            for y from x to (n-x)/2 do
                z:=n-x-y;
                if issqr(x*y+x*z+y*z) then
                    a:=a+1
                fi
            od
        od;
        return a
    end proc;
    seq(A382407(n),n=1..87);
Showing 1-7 of 7 results.