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-30 of 31 results. Next

A256549 Triangle read by rows, T(n,k) = {n,k}*h(k), where {n,k} are the Stirling set numbers and h(k) = hypergeom([-k+1,-k],[],1), for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 1, 9, 13, 0, 1, 21, 78, 73, 0, 1, 45, 325, 730, 501, 0, 1, 93, 1170, 4745, 7515, 4051, 0, 1, 189, 3913, 25550, 70140, 85071, 37633, 0, 1, 381, 12558, 124173, 526050, 1077566, 1053724, 394353, 0, 1, 765, 39325, 567210, 3482451, 10718946, 17386446, 14196708, 4596553
Offset: 0

Views

Author

Peter Luschny, Apr 12 2015

Keywords

Examples

			Triangle starts:
[1]
[0, 1]
[0, 1,  3]
[0, 1,  9,   13]
[0, 1, 21,   78,   73]
[0, 1, 45,  325,  730,  501]
[0, 1, 93, 1170, 4745, 7515, 4051]
		

Crossrefs

Programs

  • Sage
    A000262 = lambda n: simplify(hypergeometric([-n+1, -n], [], 1))
    A256549 = lambda n,k: A000262(k)*stirling_number2(n,k)
    for n in range(7): [A256549(n,k) for k in (0..n)]

Formula

Row sums are A075729.
Alternating row sums are the signed Bell numbers (-1)^n*A000110(n).
T(n,k) = A048993(n,k)*A000262(k).
T(n,n) = A000262(n).
T(n+2,2) = A068156(n).

A266533 First differences of A266532.

Original entry on oeis.org

1, 3, 3, 9, 3, 9, 9, 21, 3, 9, 9, 21, 9, 21, 21, 45, 3, 9, 9, 21, 9, 21, 21, 45, 9, 21, 21, 45, 21, 45, 45, 93, 3, 9, 9, 21, 9, 21, 21, 45, 9, 21, 21, 45, 21, 45, 45, 93, 9, 21, 21, 45, 21, 45, 45, 93, 21, 45, 45, 93, 45, 93, 93, 189, 3, 9, 9, 21, 9, 21, 21, 45, 9, 21, 21, 45, 21, 45, 45, 93
Offset: 1

Views

Author

David Applegate and Omar E. Pol, Jan 18 2016

Keywords

Comments

Number of Y-toothpicks added at n-th stage in the structure of A266532.
A simplified version of A160121.

Examples

			Written as an irregular triangle in which the row lengths are the terms of A011782 the sequence begins:
1;
3;
3, 9;
3, 9, 9, 21;
3, 9, 9, 21, 9, 21, 21, 45;
3, 9, 9, 21, 9, 21, 21, 45, 9, 21, 21, 45, 21, 45, 45, 93;
...
Observation: at least the first 11 terms of the right border coincide with A068156.
		

Crossrefs

Formula

a(1) = 1. It appears that a(n) = 3*A038573(n-1), n >= 2.

A275970 a(n) = 3*2^n + n - 1.

Original entry on oeis.org

2, 6, 13, 26, 51, 100, 197, 390, 775, 1544, 3081, 6154, 12299, 24588, 49165, 98318, 196623, 393232, 786449, 1572882, 3145747, 6291476, 12582933, 25165846, 50331671, 100663320, 201326617, 402653210, 805306395, 1610612764, 3221225501, 6442450974, 12884901919, 25769803808, 51539607585, 103079215138, 206158430243, 412316860452, 824633720869
Offset: 0

Views

Author

Miquel Cerda, Aug 15 2016

Keywords

Programs

  • Mathematica
    LinearRecurrence[{4,-5,2},{2,6,13}, 25] (* or *) Table[3*2^n + n - 1, {n,0,25}] (* G. C. Greubel, Aug 18 2016 *)
  • PARI
    a(n)=3*2^n+n-1 \\ Charles R Greathouse IV, Aug 27 2016

Formula

a(n) = 2*a(n-1) - n + 2.
a(n+1) - a(n) = A181565(n)
a(n) = A007283(n) + n - 1
a(n) = A083706(n) + A000079(n)
a(n) = A145071(n+1) - A000079(n)
a(n) = A079583(n) + A005408(n)
a(n) = A068156(n+1) - A079583(n)
a(n) = (A068156(n+1) + A005408(n)) / 2
a(n) = A000225(n) + A000325(n+1) + A005408(n)
a(n) = A068156(n+1) - A000225(n) - A000325(n+1)
a(n) = A068156(n+1) - A007283(n) + n + 2.
a(n) = A000079(n) + A000225(n) + A000295(n) + A005408(n)
From G. C. Greubel, Aug 18 2016: (Start)
O.g.f.: (2 - 2*x - x^2)/( (1-2*x)*(1-x)^2 ).
E.g.f.: 3*exp(2*x) + (x-1)*exp(x).
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-2). (End)

A324548 Maximal value which A324543 attains among the divisors of n.

Original entry on oeis.org

0, 1, 3, 3, 7, 3, 15, 4, 9, 7, 31, 3, 63, 15, 8, 16, 127, 9, 255, 7, 21, 31, 511, 8, 21, 63, 12, 27, 1023, 8, 2047, 16, 31, 127, 20, 20, 4095, 255, 78, 32, 8191, 21, 16383, 31, 9, 511, 32767, 16, 45, 21, 127, 63, 65535, 12, 53, 27, 270, 1023, 131071, 8, 262143, 2047, 21, 72, 63, 31, 524287, 127, 511, 20, 1048575, 20, 2097151, 4095, 21
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2019

Keywords

Examples

			Divisors of 161051 are [1, 11, 121, 1331, 14641, 161051]. Applying A324543 to these gives the values [0, 31, 93, 124, 496, 248]. Of these 496 is the largest, thus a(161051) = 496.
		

Crossrefs

Cf. A324543.

Programs

Formula

a(n) = Max_{d|n} A324543(d).
a(A000040(n)) = A000225(n).
a(A001248(n)) = A068156(n) = 3*(2^n - 1).

A126269 Numbers n such that hcl(n,n) < hcl(n,n-1) where hcl(n,i) is the Huffman code length; see comments.

Original entry on oeis.org

3, 4, 9, 10, 21, 22, 45, 46, 93, 94, 189, 190, 381, 382, 765, 766, 1533, 1534, 3069, 3070, 6141, 6142, 12285, 12286, 24573, 24574, 49149, 49150
Offset: 3

Views

Author

Serhat Sevki Dincer (mesti_mudam(AT)yahoo.com), Dec 22 2006

Keywords

Comments

Consider a string which consists of n distinct symbols such that symbol(i) has frequency i (i=1,2,...,n). Then hcl(n,i) is the Huffman code length of symbol(i).

Examples

			Possible Huffman codes for n = 3,4,5 are:
1 : 00
2 : 01
3 : 1
--------
1 : 100
2 : 101
3 : 11
4 : 0
--------
1 : 000
2 : 001
3 : 01
4 : 10
5 : 11
hcl(3,3)=1 < 2=hcl(3,2) and hcl(4,4)=1 < 2=hcl(4,3); so 3,4 are in the sequence.
hcl(5,5)=2=hcl(5,4) so 5 is not in the sequence.
		

Crossrefs

Formula

Conjecture: a(2k) = A033484(k-1) and a(2k-1) = A068156(k-1), k >= 2.
Conjectures from Colin Barker, Aug 06 2019: (Start)
G.f.: x^3*(3 + 4*x - 2*x^3) / ((1 - x)*(1 + x)*(1 - 2*x^2)).
a(n) = 3*a(n-2) - 2*a(n-4) for n>6.
a(n) = -5/2 + (-1)^n/2 + 3*2^((1/2)*(n-5))*(2-2*(-1)^n + sqrt(2) + (-1)^n*sqrt(2)) for n>2.
(End)

Extensions

More terms from Sean A. Irvine, Aug 05 2019

A159290 A generalized Jacobsthal sequence.

Original entry on oeis.org

3, 5, 13, 25, 53, 105, 213, 425, 853, 1705, 3413, 6825, 13653, 27305, 54613, 109225, 218453, 436905, 873813, 1747625, 3495253, 6990505, 13981013, 27962025, 55924053, 111848105, 223696213, 447392425, 894784853, 1789569705, 3579139413
Offset: 0

Views

Author

Creighton Dement, Apr 08 2009

Keywords

Comments

Sequence generated by the floretion: X*Y with X = 0.5('i + 'j + 'k + 'ee') and Y = 0.5(i' + j' + k' + 'ij' + 'ik' + 'ji' + 'jk' + 'ki' + 'kj' + 'ee')

Crossrefs

Programs

  • Magma
    [-1 + (2*(-1)^n + 5*2^(n+1))/3: n in [0..50]]; // G. C. Greubel, Jun 27 2018
  • Mathematica
    LinearRecurrence[{2, 1, -2}, {3, 5, 13}, 50] (* or *) Table[-1 + (2*(-1)^n + 5*2^(n+1))/3, {n,0,30}] (* G. C. Greubel, Jun 27 2018 *)
  • PARI
    x='x+O('x^50); Vec((3-x)/(-x^2+1-2*x+2*x^3)) \\ G. C. Greubel, Jun 27 2018
    

Formula

a(n) = -1 + (2*(-1)^n + 5*2^(n+1))/3.
G.f.: (3-x)/((1-x)*(1+x)*(1-2*x)).
a(n) = 3*A000975(n+1) - A000975(n). - R. J. Mathar, Sep 11 2019
a(n)+a(n+1) = A051633(n+1). - R. J. Mathar, Mar 23 2023

A178831 Rectangular array T(n,k) = binomial(n+1,2)*(n^k - (n-1)^k) read by antidiagonals.

Original entry on oeis.org

1, 1, 3, 1, 9, 6, 1, 21, 30, 10, 1, 45, 114, 70, 15, 1, 93, 390, 370, 135, 21, 1, 189, 1266, 1750, 915, 231, 28, 1, 381, 3990, 7810, 5535, 1911, 364, 36, 1, 765, 12354, 33670, 31515, 14091, 3556, 540, 45, 1, 1533, 37830, 141970, 172935, 97671, 30940, 6084, 765, 55
Offset: 1

Views

Author

Geoffrey Critzer, Dec 27 2010

Keywords

Comments

T(n,k) is the sum of the elements in the image sets of all functions f:{1,2,...,k}->{1,2,...,n}.
Equivalently, the sum of the distinct entries in each length k sequence on {1,2,...,n}.

Examples

			Array begins
   1,   1,    1,     1,     1,      1, ...
   3,   9,   21,    45,    93,    189, ...
   6,  30,  114,   390,  1266,   3990, ...
  10,  70,  370,  1750,  7810,  33670, ...
  15, 135,  915,  5535, 31515, 172935, ...
  21, 231, 1911, 14091, 97671, 651651, ...
		

Crossrefs

Cf. A068156 the case for n=2.

Programs

  • GAP
    T:=Flat(List([1..10], n->List([0..n-1], k-> Binomial(k+2, 2)*( (k+1)^(n-k) -k^(n-k)) ))); # G. C. Greubel, Jan 22 2019
  • Magma
    [[Binomial(k+2,2)*((k+1)^(n-k) -k^(n-k)): k in [0..n-1]]: n in [1..10]]; // G. C. Greubel, Jan 22 2019
    
  • Mathematica
    Table[Range[7]! Rest[CoefficientList[Series[Binomial[n+1,2] Exp[(n-1)x](Exp[x]-1),{x,0,7}],x]],{n,1,7}]//Grid
    T[n_, k_]:= Binomial[n+2, 2]*((n+1)^k -n^k); Table[T[k, n-k], {n, 1, 10}, {k, 0, n-1}] (* G. C. Greubel, Jan 22 2019 *)
  • PARI
    {T(n, k) = binomial(n+2, 2)*((n+1)^k -(n)^k)};
    for(n=1,10, for(k=0,n-1, print1(T(k,n-k), ", "))) \\ G. C. Greubel, Jan 22 2019
    
  • Sage
    [[binomial(k+2,2)*((k+1)^(n-k) -k^(n-k)) for k in (0..n-1)] for n in (1..10)] # G. C. Greubel, Jan 22 2019
    

Formula

E.g.f. for row n: binomial(n+1,2)*exp((n-1)*x)*(exp(x) - 1).

Extensions

Terms a(29) onward added by G. C. Greubel, Jan 22 2019

A182659 A canonical permutation designed to thwart a certain naive attempt to guess whether sequences are permutations.

Original entry on oeis.org

0, 2, 3, 1, 5, 6, 7, 8, 9, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 10, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 22, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
Offset: 0

Views

Author

Sam Alexander, Nov 26 2010

Keywords

Comments

A naive way to guess whether a function f:N->N is a permutation, based on just an initial subsequence (f(0),...,f(n)), is to guess "no" if (f(0),...,f(n)) contains a repeated entry or if there is some i in {0,...,n} such that i is not in {f(0),...,f(n)} and 2 i<=n; and guess "yes" otherwise. a(n) thwarts that method, causing it to change its mind infinitely often as n->infinity.
a(0)=0. Suppose a(0),...,a(n) have been defined.
1. If the above method guesses that (a(0),...,a(n)) is NOT an initial subsequence of a permutation, then unmark any "marked" numbers.
2. If the above method guesses that (a(0),...,a(n)) IS an initial subsequence of a permutation, then "mark" the smallest number not in {a(0),...,a(n)}.
3. Let a(n+1) be the least unmarked number not in {a(0),...,a(n)}.
A030301 can be derived by a similar method, where instead of trying to guess whether sequences are permutations, the naive victim is trying to guess whether sequences contain infinitely many 0s.

Crossrefs

Formula

a(0) = 0; if n = A068156(k+1) = 6*2^k - 3 for some k >= 0 then a(n) = A033484(k) = (n-1)/2; otherwise, a(n) = n+1. - Andrey Zabolotskiy, Feb 27 2025

Extensions

a(22) corrected and further terms added by Andrey Zabolotskiy, Feb 27 2025

A279389 3 times Mersenne primes A000668.

Original entry on oeis.org

9, 21, 93, 381, 24573, 393213, 1572861, 6442450941, 6917529027641081853, 1856910058928070412348686333, 486777830487640090174734030864381, 510423550381407695195061911147652317181
Offset: 1

Views

Author

Omar E. Pol, Dec 20 2016

Keywords

Comments

Also sum of n-th Mersenne prime and the radical of n-th even perfect number.
The binary representation of a(n) has only two zeros, starting with "10" and ending with "01". The sequence begins: 1001, 10101, 1011101, 101111101, 101111111111101,...

Crossrefs

Subsequence of A001748, and of A147758, and of A174055, and possibly of other sequences, see below:

Formula

a(n) = 3*A000668(n) = A000668(n) + A139257(n).
a(n) = phi(M(n)) + sigma(sigma(M(n))) = A000010(A000668(n)) + A000203(A000203(A000668(n))) = A000010(A000668(n)) + A051027(A000668(n)).

A362809 Numbers k for which the area of the first part of the symmetric representation of sigma(k) equals sigma(k)/3 and its width is 1.

Original entry on oeis.org

15, 207, 1023, 2975, 5950, 19359, 147455, 294910, 1207359, 5017599, 2170814463
Offset: 1

Views

Author

Hartmut F. W. Hoft, May 04 2023

Keywords

Comments

The symmetric representation of sigma(k), SRS(k), of every term k in this sequence consists of at least 3 parts, with a(1) = 15 and a(5) = 5950 being the only ones among the first 11 terms for which the SRS consists of exactly 3 parts. A251820 is a subsequence. a(12) > 5*10^9.
Suppose that a(n) = 2^i * q, i >= 0 and q odd. Because the first part of SRS(a(n)) has width 1, the smallest prime factor p of q satisfies p > 2^(i+1) -- see the locations of 1's in the triangle of A237048 and computation of widths in A249223. The area of the first part of SRS(a(n)) is (2^(i+1) - 1) * (q+1)/2 = (a(n) + 2^i) * (2^(i+1) - 1) / 2^(i+1) since the first part has 2^(i+1) - 1 legs (see the formula in A237591). Therefore, when 2^i * q is in the sequence then 2^j * q, for 0 <= j <= i is also. Sigma(a(n)) = A068156(i+1) * (a(n) + 2^i) / 2^(i+1).
Conjecture: The area of the first part of SRS(n) being equal to sigma(n)/3 implies that the first part has width 1.
This is true for all odd a(n) since their first part consists of a single leg of width 1. It also holds for even numbers through 10^7.
Observation: Consider the known 11 terms. Apart from 5950 and 294910 the rest are also in A063906. Question: Is A063906 a subsequence? - Omar E. Pol, Jul 09 2023
Answer: A063906 consists of the odd terms of this sequence since the first part of the symmetric representation of sigma for odd a(n) equals (a(n)+1)/2 which is equivalent to a(n) = 2*sigma(a(n))/3 - 1, i.e., a(n) is in A063906. - Hartmut F. W. Hoft, Jul 10 2023
A063906(10) = 58946212863 is a term here. - Omar E. Pol, Jul 12 2023

Examples

			15 belongs to the sequence since SRS(15) consists of the parts {8, 8, 8} of maximum widths {1, 2, 1} and sigma(15) = 24.
294910 belongs to the sequence since SRS(294910) consists of the 5 parts {221184, 109440, 2304, 109440, 221184} of maximum widths {1, 3, 2, 3, 1}, with 109440 + 2304 + 109440 = 211184 and sigma(294910) = 3 * 211184 = 663552.
From _Omar E. Pol_, Jul 07 2023: (Start)
Illustration of a(1) = 15.
The 14th row of triangle A237593 is [8, 3, 1, 2, 2, 1, 3, 8] and the 15th row of the same triangle is [8, 3, 2, 1, 1, 1, 1, 2, 3, 8] so the diagram of the symmetric representation of sigma(15) in the fourth quadrant is constructed as shown below:
.                                _
.                               | |
.                               | |
.                               | |
.                               | |
.                               | |
.                               | |
.                               | |
.                          _ _ _|_|
.                      _ _| |      8
.                     |    _|
.                    _|  _|
.                   |_ _|  8
.                   |
.    _ _ _ _ _ _ _ _|
.   |_ _ _ _ _ _ _ _|
.                    8
.
The area of the first part (or polygon) of the diagram equals sigma(15)/3 = 24/3 = 8 and its width is 1 so 15 is in the sequence. (End)
		

Crossrefs

Programs

  • Mathematica
    (* substitute code suggested by Andrey Zabolotskiy *)
    cd[n_, k_] := Boole[Divisible[n, k]]
    a237048[s_, j_] := If[OddQ[j], cd[s, j], cd[s-j/2, j]]
    firstZeroQ[s_, a_] := Sum[(-1)^(j+1)a237048[s, j], {j, a}]==0
    evenPart[n_] := 2^IntegerExponent[n, 2]
    a362809[{m_, n_}] := Module[{a, b}, Select[Range[m, n], (a=evenPart[#]; b=(2a-1)/(2a); DivisorSigma[1, #]==3b(#+a)&&firstZeroQ[#, 2a])&]]
    a362809[{1, 2170814463}] (* a(11) has a long computation time *)
Previous Showing 21-30 of 31 results. Next