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

A113320 a(1)=1 and a(n) for n>1 has the smallest positive value such that Sum_{i=1..n} a(i)^a(n-i+1) is prime.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 4, 4, 6, 2, 6, 4, 18, 6, 4, 20, 6, 30, 4, 40, 30, 8, 18, 16, 40, 128, 24, 40, 58, 194, 78, 84, 56, 56, 72, 112, 98, 300, 444, 54, 978, 1938, 120, 126, 6, 1750
Offset: 1

Views

Author

Jonathan Vos Post, Jan 07 2006

Keywords

Comments

Previous name was: Least integers so ascending descending base exponent transforms all prime.
This is the first sequence submitted as a solution to an "ascending descending base exponent transform inverse problem" where the sequence is iteratively defined such that the transform meets a constraint. The sequence is infinite, but it is hard to characterize the asymptotic cost of adding an n-th term. A003101 is the ascending descending base exponent transform of natural numbers A000027. The ascending descending base exponent transform applied to the Fibonacci numbers is A113122; applied to the tribonacci numbers is A113153; applied to the Lucas numbers is A113154.

Examples

			a(1) = 1 by definition.
a(2) = 1 because 1 is the min such that 1^a(2) + a(2)^1 is prime (p=2).
a(3) = 1 because 1 is the min such that 1^a(3) + 1^1 + a(3)^1 is prime (p=5).
a(4) = 2 because 2 is the min such that 1^a(4) + 1^1 + 3^1 + a(4)^1 is prime (p=7).
		

Crossrefs

Programs

  • Mathematica
    inve[w_] := Total[w^Reverse[w]]; a[1] = 1; a[n_] := a[n] = Block[{k = 0}, While[! PrimeQ[ inve@ Append[Array[a, n-1], ++k]]]; k]; Array[a, 46] (* Giovanni Resta, Jun 13 2016 *)
  • PARI
    lista(n)={my(a=vector(n)); a[1]=1; print1(1, ", "); for(n=2, #a, my(t=sum(i=2, n-1, a[i]^a[n-i+1])); my(k=1); while(!ispseudoprime(t+1+k), k++); a[n]=k; print1(k, ", "))} \\ Andrew Howroyd, Jan 03 2020

Formula

a(1) = 1. For n>1, a(n) = min {k>0: a(1)^k + k^a(1) + Sum_{i=2..n-1} a(i)^a(n-i+1) is prime}.

Extensions

Corrected and extended by Giovanni Resta, Jun 13 2016
New name from Giovanni Resta, Jan 03 2020

A113336 Least integers, starting with 2, so ascending descending base exponent transforms all prime.

Original entry on oeis.org

2, 1, 6, 6, 18, 12, 18, 42, 288, 108, 180, 1122, 1458, 660
Offset: 1

Views

Author

Jonathan Vos Post, Jan 07 2006

Keywords

Comments

This is the second sequence submitted as a solution to an "ascending descending base exponent transform inverse problem" where the sequence is iteratively defined such that the transform meets a constraint. The sequence is probably infinite, but it is hard to characterize the asymptotic cost of adding an n-th term (the 9th terms is at least 250). A003101 is the ascending descending base exponent transform of natural numbers A000027. The ascending descending base exponent transform applied to the Fibonacci numbers is A113122; applied to the tribonacci numbers is A113153; applied to the Lucas numbers is A113154.

Examples

			a(1) = 2 by definition.
a(2) = 1 because 1 is the min such that 2^a(2) + a(2)^2 is prime (p=3).
a(3) = 6 because 6 is the min such that 2^a(3) + 1^1 + a(3)^2 is prime (2^6 + 1^1 + 6^1 = 101).
a(4) = 6 because 2^6 + 1^6 + 6^1 + 6^2 = 107 is prime.
a(5) = 18 because 2^18 + 1^6 + 6^6 + 6^1 + 18^2 = 309131 is prime.
a(6) = 12 because 2^12 + 1^18 + 6^6 + 6^6 + 18^1 + 12^2 = 97571 is prime.
a(7) = 18 because 2^18 + 1^12 + 6^18 + 6^6 + 18^6 + 12^1 + 18^2 = 101559990989777 is prime.
a(8) = 42 because 2^42 + 1^18 + 6^12 + 6^18 + 18^6 + 12^6 + 18^1 + 42^2 = 105960216961847 is prime.
a(9) > 250.
		

Crossrefs

Formula

a(1) = 2. For n>1: a(n) = min {n>0: Sum_{i=1..n} a(i)^a(n-i+1) is prime}.

Extensions

a(9)-a(14) from Giovanni Resta, Jun 13 2016

A234568 Sum_{k=0..n} (n-k)^(2*k).

Original entry on oeis.org

1, 1, 2, 6, 27, 163, 1268, 12344, 145653, 2036149, 33192790, 622384730, 13263528351, 318121600695, 8517247764136, 252725694989612, 8258153081400857, 295515712276222953, 11523986940937975402, 487562536078882116718, 22291094729329088403299, 1097336766599161926448779
Offset: 0

Views

Author

Paul D. Hanna, Dec 28 2013

Keywords

Examples

			O.g.f.: A(x) = 1 + x + 2*x^2 + 6*x^3 + 27*x^4 + 163*x^5 + 1268*x^6 +...
O.g.f.: A(x) = 1 + x/(1-x) + x^2/(1-4*x) + x^3/(1-9*x) + x^4/(1-16*x) +...
E.g.f.: E(x) = 1 + x + 2*x^2/2! + 6*x^3/3! + 27*x^4/4! + 163*x^5/5! +...
where the e.g.f. is a series involving iterated integration:
E(x) = 1 + Integral exp(x) dx + Integral^2 exp(4*x) dx^2 + Integral^3 exp(9*x) dx^3 + Integral^4 exp(16*x) dx^4 +...
		

Crossrefs

Programs

  • Mathematica
    Flatten[{1,Table[Sum[(n-k)^(2*k),{k,0,n}],{n,1,20}]}] (* Vaclav Kotesovec, Feb 23 2014 *)
  • PARI
    a(n)=sum(k=0, n, (n-k)^(2*k))
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* From o.g.f. Sum_{n>=0} x^n/(1-n^2*x): */
    {a(n)=polcoeff(sum(m=0, n, x^m/(1-m^2*x+x*O(x^n))), n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* From e.g.f. involving iterated integration: */
    INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G
    a(n)=my(A=1+x);A=1+sum(k=1,n,INTEGRATE(k,exp(k^2*x+x*O(x^n))));n!*polcoeff(A,n)
    for(n=0,20,print1(a(n),", ")) \\ Paul D. Hanna, Dec 28 2013

Formula

O.g.f.: Sum_{n>=0} x^n / (1 - n^2*x).
E.g.f.: Sum_{n>=0} Integral^n exp(n^2*x) dx^n, where integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration.
a(n) ~ sqrt(Pi) * (n/LambertW(exp(1)*n))^(1/2 + 2*n - 2*n/LambertW(exp(1)*n)) / sqrt(1 + LambertW(exp(1)*n)). - Vaclav Kotesovec, Dec 04 2021

A105795 Shallow diagonal sums of the triangle k!*Stirling2(n,k): a(n) = Sum_{k=0..floor(n/2)} T(n-k,k) where T is A019538.

Original entry on oeis.org

1, 0, 1, 1, 3, 7, 21, 67, 237, 907, 3741, 16507, 77517, 385627, 2024301, 11174587, 64673997, 391392667, 2470864941, 16237279867, 110858862477, 784987938907, 5755734591981, 43636725010747, 341615028340557, 2758165832945947, 22940755633301421, 196354180631212027
Offset: 0

Views

Author

Paul Barry, Apr 20 2005

Keywords

Comments

From Gus Wiseman, Jan 08 2019: (Start)
Also the number of set partitions of {1,...,n} into blocks of sizes > 1 whose minima form an initial interval of positive integers. For example, the a(5) = 7 set partitions are:
{{1,2,3,4,5}}
{{1,3},{2,4,5}}
{{1,4},{2,3,5}}
{{1,5},{2,3,4}}
{{1,3,4},{2,5}}
{{1,3,5},{2,4}}
{{1,4,5},{2,3}}
Also the number of ordered set partitions of {1,...,n-k} of length k, for any 0 <= k <= n. For example, the a(5) = 7 ordered set partitions are:
{{1,2,3,4}}
{{1},{2,3}}
{{2},{1,3}}
{{3},{1,2}}
{{1,2},{3}}
{{1,3},{2}}
{{2,3},{1}}
(End)

Examples

			a(8) = 1!*Stirling2(7,1) + 2!*Stirling2(6,2) + 3!*Stirling2(5,3) + 4!*Stirling2(4,4) = 1 + 62 + 150 + 24 = 237. - _Peter Bala_, Jul 09 2014
		

Crossrefs

Programs

  • Maple
    a:= n-> add(Stirling2(n-k, k)*k!, k=0..n/2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 09 2014
  • Mathematica
    Table[Sum[StirlingS2[n-k, k]*k!, {k,0,n/2}],{n,0,20}] (* Vaclav Kotesovec, Jul 16 2014 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Sum[Length[Join@@Permutations/@Select[sps[Range[n-k]],Length[#]==k&]],{k,0,n}],{n,0,10}] (* Gus Wiseman, Jan 08 2019 *)
  • PARI
    /* From Paul Barry's formula: */
    {a(n)=sum(k=0,floor(n/2), sum(i=0,k,(-1)^i*binomial(k, i)*(k-i)^(n-k)))} \\ Paul D. Hanna, Dec 28 2013
    for(n=0,30,print1(a(n),", "))
    
  • PARI
    /* From e.g.f. series involving iterated integration: */
    {INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G}
    {a(n)=local(A=1+x);A=1+sum(k=1,n,INTEGRATE(k,(exp(x+x*O(x^n))-1)^k ));n!*polcoeff(A,n)} \\ Paul D. Hanna, Dec 28 2013

Formula

a(n) = sum{k=0..floor(n/2), sum{(-1)^i*binomial(k, i)*(k-i)^(n-k)}}.
E.g.f.: Sum_{n>=0} Integral^n (exp(x) - 1)^n dx^n, where integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration. - Paul D. Hanna, Dec 28 2013
Formal o.g.f.: 1/(1 + x)*sum {n >= 0} 1/(1 - n*x)*(x/(1 + x))^n = 1 + x^2 + x^3 + 3*x^4 + 7*x^5 + .... Cf. A229046. - Peter Bala, Jul 09 2014

A062810 a(n) = Sum_{i=1..n} i^(n - i) + (n - i)^i.

Original entry on oeis.org

1, 3, 7, 17, 45, 131, 419, 1465, 5561, 22755, 99727, 465537, 2303829, 12037571, 66174411, 381560425, 2301307841, 14483421859, 94909491607, 646309392369, 4565559980989, 33401808977411, 252713264780595, 1974606909857945
Offset: 1

Views

Author

Olivier Gérard, Jun 23 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Sum[i^(n - i) + (n - i)^i, {i, 1, n}]
  • PARI
    a(n) = sum(i=1, n, i^(n-i) + (n-i)^i); \\ Michel Marcus, Mar 24 2019

Formula

a(n) = 2 * A026898(n-1) - 1.
a(n) = 2 * A003101(n-1) + 1.

A247358 Triangle read by rows: n-th row contains powers b^e with b + e = n + 1 in natural order.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 4, 8, 9, 1, 5, 16, 16, 27, 1, 6, 25, 32, 64, 81, 1, 7, 36, 64, 125, 243, 256, 1, 8, 49, 128, 216, 625, 729, 1024, 1, 9, 64, 256, 343, 1296, 2187, 3125, 4096, 1, 10, 81, 512, 512, 2401, 6561, 7776, 15625, 16384, 1, 11, 100, 729, 1024, 4096, 16807, 19683, 46656, 65536, 78125
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 14 2014

Keywords

Comments

Sorted rows of triangle A051129.

Examples

			.  1  |  1                            |  1^1
.  2  |  1 2                          |  1^2 2^1
.  3  |  1 3  4                       |  1^3 3^1 2^2
.  4  |  1 4  8   9                   |  1^4 4^1 2^3 3^2
.  5  |  1 5 16  16  27               |  1^5 5^1 2^4 4^2 3^3
.  6  |  1 6 25  32  64  81           |  1^6 6^1 5^2 2^5 4^3 3^4
.  7  |  1 7 36  64 125 243 256       |  1^7 7^1 6^2 2^6 5^3 3^5 4^4
.  8  |  1 8 49 128 216 625 729 1024  |  1^8 8^1 7^2 2^7 6^3 5^4 3^6 4^5 .
		

Crossrefs

Cf. A051129, A003101 (row sums), A247363 (central terms), A003320 (row maxima).

Programs

  • Haskell
    import Data.List (sort)
    a247358 n k = a247358_tabl !! (n-1) !! (k-1)
    a247358_row n = a247358_tabl !! (n-1)
    a247358_tabl = map sort a051129_tabl
    
  • Mathematica
    Table[Table[k^(n-k+1), {k, 1, n}] // Sort, {n, 1, 11}] // Flatten (* Jean-François Alcover, Nov 18 2019 *)
  • PARI
    row(n) = vecsort(vector(n, k, k^(n-k+1))); \\ Michel Marcus, Jan 24 2022
  • Python
    from itertools import chain
    A247358_list = list(chain.from_iterable(sorted((b+1)**(n-b) for b in range(n)) for n in range(1,8))) # Chai Wah Wu, Sep 14 2014
    

A062809 a(n) = Sum_{i = 1..n} (n - i)^(1 + i).

Original entry on oeis.org

0, 1, 5, 18, 60, 203, 725, 2772, 11368, 49853, 232757, 1151902, 6018772, 33087191, 190780197, 1150653904, 7241710912, 47454745785, 323154696165, 2282779990474, 16700904488684, 126356632390275, 987303454928949
Offset: 1

Views

Author

Olivier Gérard, Jun 23 2001

Keywords

Crossrefs

Programs

  • Maple
    a:=n->sum((n-j)^j,j=2..n): seq(a(n), n=2..24); # Zerinvary Lajos, Jun 07 2008
  • Mathematica
    Sum[(n - i)^(1 + i), {i, 1, n}]
  • PARI
    a(n) = sum(i=1, n, (n-i)^(1+i)); \\ Michel Marcus, Mar 24 2019

Formula

a(n) ~ sqrt(2*Pi) * ((n + 1)/LambertW(exp(1)*(n + 1)))^(1/2 + (n + 1)*(1 - 1/LambertW(exp(1)*(n + 1)))) / sqrt(1 + LambertW(exp(1)*(n + 1))). - Vaclav Kotesovec, Dec 04 2021

A113173 Ascending descending base exponent transform of semiprimes (A001358).

Original entry on oeis.org

256, 5392, 315361, 11667713, 717360537, 83932270482, 27775696582531, 22260761742531649, 109563850113131234720, 2013390472722146301196, 1899501614194512059559835, 85600281199526209989968735
Offset: 1

Views

Author

Jonathan Vos Post, Jan 07 2006

Keywords

Comments

A003101 is the ascending descending base exponent transform of natural numbers A000027. The ascending descending base exponent transform applied to the Fibonacci numbers is A113122; applied to the tribonacci numbers is A113153; applied to the Lucas numbers is A113154. a(7) is itself semiprime. The smallest primes in this sequence are a(3) = 315361 and a(4) = 11667713. What is the next prime?

Examples

			a(1) = 256 because semiprime(1)^semiprime(1) = 4^4 = 256.
a(2) = 5392 because prime(1)^prime(2) + prime(2)^prime(1) = 4^6 + 6^4 = 5392.
a(3) = 315361 because 4^9 + 6^6 + 9^4 = 315361.
a(4) = 11667713 = 4^10 + 6^9 + 9^6 + 10^4.
a(5) = 717360537 = 4^14 + 6^10 + 9^9 + 10^6 + 14^4.
a(6) = 83932270482 = 4^15 + 6^14 + 9^10 + 10^9 + 14^6 + 15^4.
a(7) = 27775696582531 = 4^21 + 6^15 + 9^14 + 10^10 + 14^9 + 15^6 + 21^4.
a(8) = 22260761742531649 = 4^22 + 6^21 + 9^15 + 10^14 + 14^10 + 15^9 + 21^6 + 22^4.
a(9) = 109563850113131234720 = 4^25 + 6^22 + 9^21 + 10^15 + 14^14 + 15^10 + 21^9 + 22^6 + 25^4.
		

Crossrefs

Programs

  • Mathematica
    A001358[A001358%5Bk%5D%5B%5Bk%5D%5D)%5E((A001358%5Bn%20-%20k%20+%201%5D%5B%5Bn%20-%20k%20+%201%5D%5D)),%20%7Bk,%201,%20n%7D%5D,%20%7Bn,%201,%2010%7D%5D%20(*%20_G.%20C.%20Greubel">] := Select[Range[100], PrimeOmega[#] == 2 &]; Table[Sum[(A001358[k][[k]])^((A001358[n - k + 1][[n - k + 1]])), {k, 1, n}], {n, 1, 10}] (* _G. C. Greubel, May 19 2017 *)

Formula

a(n) = Sum_{i=1..n} (semiprime(i))^(semiprime(n-i+1)).
a(n) = Sum_{i=1..n} (A001358(i))^(A001358(n-i+1)).

A242431 Triangle read by rows: T(n, k) = (k + 1)*T(n-1, k) + Sum_{j=k..n-1} T(n-1, j) for k < n, T(n, n) = 1. T(n, k) for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 14, 10, 4, 1, 43, 35, 17, 5, 1, 144, 128, 74, 26, 6, 1, 523, 491, 329, 137, 37, 7, 1, 2048, 1984, 1498, 730, 230, 50, 8, 1, 8597, 8469, 7011, 3939, 1439, 359, 65, 9, 1, 38486, 38230, 33856, 21568, 9068, 2588, 530, 82, 10, 1
Offset: 0

Views

Author

Peter Luschny, May 14 2014

Keywords

Examples

			0|    1;
1|    2,    1;
2|    5,    3,    1;
3|   14,   10,    4,   1;
4|   43,   35,   17,   5,   1;
5|  144,  128,   74,  26,   6,  1;
6|  523,  491,  329, 137,  37,  7, 1;
7| 2048, 1984, 1498, 730, 230, 50, 8, 1;
		

Crossrefs

Programs

  • Maple
    T := proc(n, k) option remember; local j;
        if k=n then 1
      elif k>n then 0
      else (k+1)*T(n-1, k) + add(T(n-1, j), j=k..n)
        fi end:
    seq(print(seq(T(n,k), k=0..n)), n=0..7);
  • Sage
    def A242431_rows():
        T = []; n = 0
        while True:
            T.append(1)
            yield T
            for k in (0..n):
                T[k] = (k+1)*T[k] + add(T[j] for j in (k..n))
            n += 1
    a = A242431_rows()
    for n in range(8): next(a)

Formula

T(n, 0) = A047970(n).
Sum_{k=0..n} T(n, k) = A112532(n+1).
From Mathew Englander, Feb 25 2021: (Start)
T(n,k) = 1 + Sum_{i = k+1..n} i*(i+1)^(n-i).
T(n,k) = T(n,k+1) + (k+1)*(k+2)^(n-k-1) for 0 <= k < n.
T(n,k) = T(n,k+1) + (k+2)*(T(n-1,k) - T(n-1,k+1)) for 0 <= k <= n-2.
T(n,k) = Sum_{i = 0..n-k} (k+2)^i*A089246(n-k,i).
Sum_{i = k..n} T(i,k) = Sum_{i = 0..n-k} (n+2-i)^i = Sum_{i = 0..n-k} A101494(n-k,i)*(k+2)^i. (End)

A349878 Expansion of Sum_{k>=0} k^3 * x^k/(1 - k * x).

Original entry on oeis.org

0, 1, 9, 44, 178, 689, 2723, 11304, 49772, 232657, 1151781, 6018628, 33087022, 190780001, 1150653679, 7241710656, 47454745496, 323154695841, 2282779990113, 16700904488284, 126356632389834, 987303454928465, 7957133905608283, 66071772829246808
Offset: 0

Views

Author

Seiichi Manyama, Dec 03 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[k^(n - k + 3), {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Dec 04 2021 *)
  • PARI
    a(n, s=3, t=1) = sum(k=0, n, k^(t*(n-k)+s));
    
  • PARI
    my(N=40, x='x+O('x^N)); concat(0, Vec(sum(k=0, N, k^3*x^k/(1-k*x))))

Formula

a(n) = Sum_{k=0..n} k^(n-k+3).
a(n) ~ sqrt(2*Pi) * ((n + 3)/LambertW(exp(1)*(n + 3)))^(1/2 + (n + 3)*(1 - 1/LambertW(exp(1)*(n + 3)))) / sqrt(1 + LambertW(exp(1)*(n + 3))). - Vaclav Kotesovec, Dec 04 2021
Previous Showing 11-20 of 31 results. Next