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

A145032 If t(n) is the maximal triangular number not exceeding n, then a(n) is the n-th prime for which a(n)-t(a(n)) is a triangular number.

Original entry on oeis.org

2, 3, 7, 11, 13, 29, 31, 37, 61, 67, 79, 97, 101, 137, 139, 151, 163, 181, 191, 193, 211, 241, 263, 277, 331, 379, 409, 421, 463, 499, 571, 601, 631, 709, 739, 751, 769, 821, 823, 947, 967, 991, 1063, 1087, 1091, 1109, 1117, 1129, 1231, 1303, 1327, 1381, 1399
Offset: 1

Views

Author

Vladimir Shevelev, Sep 30 2008

Keywords

Comments

Primes p for which p-A057944(p) is in A000217. [From R. J. Mathar, Oct 25 2010]

Examples

			E. g., t(181)=171 (see A000217) and 181-171=10 is triangular number. Therefore p=181 is in the sequence
		

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Oct 25 2010: (Start)
    A057944 := proc(n) for i from 0 do if i*(i+1)/2 > n then return (i-1)*i /2 ; end if; end do: end proc:
    isA000217 := proc(n) issqr(8*n+1) ; end proc:
    isA145032 := proc(p) if isprime(p) then tres := p-A057944(p) ; isA000217(tres) ; else false; end if; end proc:
    for n from 1 to 400 do p := ithprime(n) ; if isA145032(p) then printf("%d,",p) ; end if; end do: (End)

Extensions

More terms from R. J. Mathar, Oct 25 2010

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

A326923 a(n) is the number of iterations needed to reach 1 or 9 starting at n and using the map k -> (k/2 if k is even, otherwise k + (largest triangular number < k)). Set a(n) = -1 if the trajectory never reaches 1 or 9.

Original entry on oeis.org

0, 1, 3, 2, 4, 4, 9, 3, 0, 5, 4, 5, 8, 10, 10, 4, 6, 1, 8, 6, 3, 5, 7, 6, 9, 9, 8, 11, 15, 11, 17, 5, 19, 7, 19, 2, 27, 9, 41, 7, 33, 4, 39, 6, 47, 8, 10, 7, 12, 10, 9, 10, 14, 9, 12, 12, 14, 16, 16, 12, 18, 18, 18, 6, 14, 20, 26, 8, 32, 20, 24, 3, 26, 28, 40, 10, 32
Offset: 1

Views

Author

Ali Sada, Oct 21 2019

Keywords

Comments

It is conjectured that this algorithm will always terminate at 1 or 9.
Jim Nastos verified the conjecture for n <= 64*10^5.
Jim Nastos verified the conjecture for n <= 45248000.

Examples

			For n = 11: 11+10=21; 21+15=36; 36/2=18; 18/2=9; taking 4 steps to reach 9, so a(11)=4.
		

Crossrefs

Programs

  • Maple
    LT:= proc(k) local n;
       n:= ceil((sqrt(1+8*k)-1)/2);
       n*(n-1)/2
    end proc:
    f:= proc(k) option remember; if k::even then 1+procname(k/2) else 1+procname(k+LT(k))fi
    end proc:
    f(1):=0: f(9):= 0:
    map(f, [$1..100]); # Robert Israel, Oct 23 2019
  • Mathematica
    LT[k_] := Module[{n}, n = Ceiling[(Sqrt[1+8k]-1)/2]; n(n-1)/2]; f[k_] := f[k] = If[EvenQ[k], 1+f[k/2], 1+f[k+LT[k]]]; f[1] = 0; f[9] = 0;
    Array[f, 100] (* Jean-François Alcover, Aug 27 2022, after Robert Israel *)

A354762 Irregular triangle read by rows in which the row n lists the partition of n into the minimum number of triangular parts.

Original entry on oeis.org

0, 1, 1, 1, 3, 3, 1, 3, 1, 1, 6, 6, 1, 6, 1, 1, 6, 3, 10, 10, 1, 10, 1, 1, 10, 3, 10, 3, 1, 15, 15, 1, 15, 1, 1, 15, 3, 15, 3, 1, 15, 3, 1, 1, 21, 21, 1, 21, 1, 1, 21, 3, 21, 3, 1, 21, 3, 1, 1, 21, 6, 28, 28, 1, 28, 1, 1, 28, 3, 28, 3, 1, 28, 3, 1, 1, 28, 6, 28, 6, 1
Offset: 0

Views

Author

Stefano Spezia, Jun 06 2022

Keywords

Comments

The representation of the partitions (for fixed n) is as (weakly) decreasing list of the parts.

Examples

			The irregular triangle begins:
     0;
     1;
     1, 1;
     3;
     3, 1;
     3, 1, 1;
     6;
     6, 1;
     6, 1, 1;
     6, 3;
    10;
    10, 1;
    10, 1, 1;
    10, 3;
    10, 3, 1;
    15;
    15, 1;
    15, 1, 1;
    15, 3;
    15, 3, 1;
    15, 3, 1, 1;
    ...
		

Crossrefs

Cf. A001477 (row sums), A057944 (1st column), A057945 (row lengths).
Cf. A354763.

Programs

  • Mathematica
    Flatten[Join[{0}, Table[First[IntegerPartitions[n, All, Table[k(k+1)/2, {k, (Sqrt[1+8n]-1)/2}]]], {n, 35}]]]

A094261 a(n) = n(n-1)(n-3)(n-6)...(n-t), where t is the largest triangular number less than n; number of factors in the product is ceiling((sqrt(1+8*n)-1)/2).

Original entry on oeis.org

1, 2, 6, 12, 40, 90, 168, 560, 1296, 2520, 4400, 14256, 32760, 64064, 113400, 187200, 586432, 1321920, 2560896, 4522000, 7484400, 11797632, 35784320, 78871968, 150480000, 263120000, 433060992, 681080400, 1033305728, 3044304000
Offset: 1

Views

Author

Amarnath Murthy, Apr 26 2004

Keywords

Examples

			a(8) = 8*(8-1)*(8-3)*(8-6) = 8*7*5*2 = 560.
		

Crossrefs

Programs

  • Maple
    a:=n->product(n-k*(k+1)/2,k=0..ceil((sqrt(1+8*n)-1)/2)-1): seq(a(n),n=1..35); # Emeric Deutsch, Feb 03 2006

Extensions

Corrected and extended by Emeric Deutsch, Feb 03 2006

A274011 a(n) is the greatest number of elements in a partition of n into distinct parts such that no two elements add to another.

Original entry on oeis.org

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

Views

Author

Gordon Hamilton, Jun 06 2016

Keywords

Comments

A lower bound for a(n^2) is n (use the n^2 partition of the first n consecutive odd numbers.)
An upper bound u for a(n) is found by a partition of A057944(n); [1,..,u]. This gives u = floor((floor(sqrt(8*n+7))-1)/2). - David A. Corneth, Jun 06 2016

Examples

			a(24) = 5 because {1,2,4,7,10} is a partition of 24 and there are no sum-free partitions with more parts.
Candidates for such a partition of size 5 of 24 are found by adding [0,1,2,3,4] to partitions of 5 of 24 - (0+1+2+3+4). - _David A. Corneth_, Jun 06 2016
a(25) = 5 because {1,3,5,7,9} is a partition of 25. {1,2,4,7,11} does not show that a(25) >= 5 because 4,7, and 11 are all elements of the set and 4+7=11.
		

Programs

  • Mathematica
    dif[w_] := Length[w] <= 2 || {} == Intersection[w, Reap[ Do[ Sow[w[[i]] + w[[j]]], {i, Length@ w}, {j, i-1}]][[2, 1]]]; p[tg_, w_] := If[tg == 0, bst = Max[bst, Length@ w], Block[{v=If[w == {}, 0, Last@w], u}, Do[u = Append[w, k]; If[dif@ u, p[tg-k, u]], {k, v+1, tg}]]]; a[n_] := (bst = 0; p[n, {}]; bst); Array[a, 50] (* Giovanni Resta, Jun 06 2016 *)

Extensions

a(25)-a(86) from Giovanni Resta, Jun 06 2016

A307392 Number of partitions of n with at most one part in the interval [i*(i+1)/2, i+(i*(i+1)/2)] for all nonnegative integers i.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 3, 3, 3, 4, 6, 9, 11, 12, 12, 12, 13, 15, 18, 22, 27, 34, 42, 50, 56, 60, 63, 66, 70, 76, 84, 94, 106, 120, 136, 154, 177, 206, 241, 279, 317, 352, 381, 404, 423, 442, 464, 492, 528, 574, 630, 694, 764, 839, 920, 1008, 1104, 1213, 1341, 1494, 1674, 1878
Offset: 0

Views

Author

Igor Haladjian, Apr 06 2019

Keywords

Comments

The intervals are: [1,2], [3,5], [6,9], [10,14], [15,20], [21,27], [28,35], [36,44], [45,54], [55,65], ... .

Examples

			a(0)=1 by definition of the empty partition.
a(10)=6 because 10=9+1=8+2=7+3=6+4=6+3+1 (for example, you cannot take 5+5 or 7+2+1 because of the definition of a(n)).
		

Crossrefs

Programs

  • Maple
    f:= n-> 1+add(x^j, j=n*(n+1)/2..n*(n+3)/2):
    a:= n-> coeff(mul(f(k), k=1..ceil((sqrt(9+8*n)-3)/2)), x, n):
    seq(a(n), n=0..61);
  • PARI
    f(n, x) = (1+sum(j=n*(n+1)/2, n*(n+3)/2, x^j));
    a(n) = polcoef(prod(k=1, ceil((sqrt(9+8*n)-3)/2), f(k, x)), n, x); \\ version 2.11.0 or newer; Michel Marcus, Apr 08 2019
    
  • PARI
    first(n) = v = Vecrev(Vec(a(n))); vector(n, i, v[i]) \\ using a(n) from above \\ David A. Corneth, Apr 08 2019

Formula

G.f.: Product_{n>=0} (1 + Sum_{k=(n*(n+1)/2)..(n*(n+3)/2)} x^k).
Previous Showing 11-17 of 17 results.