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

A002262 Triangle read by rows: T(n,k) = k, 0 <= k <= n, in which row n lists the first n+1 nonnegative integers.

Original entry on oeis.org

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

Views

Author

Angele Hamel (amh(AT)maths.soton.ac.uk)

Keywords

Comments

The point with coordinates (x = A025581(n), y = A002262(n)) sweeps out the first quadrant by upwards antidiagonals. N. J. A. Sloane, Jul 17 2018
Old name: Integers 0 to n followed by integers 0 to n+1 etc.
a(n) = n - the largest triangular number <= n. - Amarnath Murthy, Dec 25 2001
The PARI functions t1, t2 can be used to read a square array T(n,k) (n >= 0, k >= 0) by antidiagonals downwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002
Values x of unique solution pair (x,y) to equation T(x+y) + x = n, where T(k)=A000217(k). - Lekraj Beedassy, Aug 21 2004
a(A000217(n)) = 0; a(A000096(n)) = n. - Reinhard Zumkeller, May 20 2009
Concatenation of the set representation of ordinal numbers, where the n-th ordinal number is represented by the set of all ordinals preceding n, 0 being represented by the empty set. - Daniel Forgues, Apr 27 2011
An integer sequence is nonnegative if and only if it is a subsequence of this sequence. - Charles R Greathouse IV, Sep 21 2011
a(A195678(n)) = A000040(n) and a(m) <> A000040(n) for m < A195678(n), an example of the preceding comment. - Reinhard Zumkeller, Sep 23 2011
A sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. A002262 is reluctant sequence of 0,1,2,3,... The nonnegative integers, A001477. - Boris Putievskiy, Dec 12 2012

Examples

			From _Daniel Forgues_, Apr 27 2011: (Start)
Examples of set-theoretic representation of ordinal numbers:
  0: {}
  1: {0} = {{}}
  2: {0, 1} = {0, {0}} = {{}, {{}}}
  3: {0, 1, 2} = {{}, {0}, {0, 1}} = ... = {{}, {{}}, {{}, {{}}}} (End)
From _Omar E. Pol_, Jul 15 2012: (Start)
  0;
  0, 1;
  0, 1, 2;
  0, 1, 2, 3;
  0, 1, 2, 3, 4;
  0, 1, 2, 3, 4, 5;
  0, 1, 2, 3, 4, 5, 6;
  0, 1, 2, 3, 4, 5, 6, 7;
  0, 1, 2, 3, 4, 5, 6, 7, 8;
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
(End)
		

Crossrefs

As a sequence, essentially same as A048151.
Cf. A060510 (parity).

Programs

  • Haskell
    a002262 n k = a002262_tabl !! n !! k
    a002262_row n = a002262_tabl !! n
    a002262_tabl = map (enumFromTo 0) [0..]
    a002262_list = concat a002262_tabl
    -- Reinhard Zumkeller, Aug 05 2015, Jul 13 2012, Mar 07 2011
    
  • Maple
    seq(seq(i,i=0..n),n=0..14); # Peter Luschny, Sep 22 2011
    A002262 := n -> n - binomial(floor((1/2)+sqrt(2*(1+n))),2);
  • Mathematica
    m[n_]:= Floor[(-1 + Sqrt[8n - 7])/2]
    b[n_]:= n - m[n] (m[n] + 1)/2
    Table[m[n], {n, 1, 105}]     (* A003056 *)
    Table[b[n], {n, 1, 105}]     (* A002260 *)
    Table[b[n] - 1, {n, 1, 120}] (* A002262 *)
    (* Clark Kimberling, Jun 14 2011 *)
    Flatten[Table[k, {n, 0, 14}, {k, 0, n}]] (* Alonso del Arte, Sep 21 2011 *)
    Flatten[Table[Range[0,n], {n,0,15}]] (* Harvey P. Dale, Jan 31 2015 *)
  • PARI
    a(n)=n-binomial(round(sqrt(2+2*n)),2)
    
  • PARI
    t1(n)=n-binomial(floor(1/2+sqrt(2+2*n)),2) /* A002262, this sequence */
    
  • PARI
    t2(n)=binomial(floor(3/2+sqrt(2+2*n)),2)-(n+1) /* A025581, cf. comment by Somos for reading arrays by antidiagonals */
    
  • PARI
    concat(vector(15,n,vector(n,i,i-1)))  \\ M. F. Hasler, Sep 21 2011
    
  • PARI
    apply( {A002262(n)=n-binomial(sqrtint(8*n+8)\/2,2)}, [0..99]) \\ M. F. Hasler, Oct 20 2022
    
  • Python
    for i in range(16):
        for j in range(i):
            print(j, end=", ") # Mohammad Saleh Dinparvar, May 13 2020
    
  • Python
    from math import comb, isqrt
    def a(n): return n - comb((1+isqrt(8+8*n))//2, 2)
    print([a(n) for n in range(105)]) # Michael S. Branicky, May 07 2023

Formula

a(n) = A002260(n) - 1.
a(n) = n - (trinv(n)*(trinv(n)-1))/2; trinv := n -> floor((1+sqrt(1+8*n))/2) (cf. A002024); # gives integral inverses of triangular numbers
a(n) = n - A000217(A003056(n)) = n - A057944(n). - Lekraj Beedassy, Aug 21 2004
a(n) = A140129(A023758(n+2)). - Reinhard Zumkeller, May 14 2008
a(n) = f(n,1) with f(n,m) = if nReinhard Zumkeller, May 20 2009
a(n) = (1/2)*(t - t^2 + 2*n), where t = floor(sqrt(2*n+1) + 1/2) = round(sqrt(2*n+1)). - Ridouane Oudra, Dec 01 2019
a(n) = ceiling((-1 + sqrt(9 + 8*n))/2) * (1 - ((1/2)*ceiling((1 + sqrt(9 + 8*n))/2))) + n. - Ryan Jean, Sep 03 2022
G.f.: x*y/((1 - x)*(1 - x*y)^2). - Stefano Spezia, Feb 21 2024

Extensions

New name from Omar E. Pol, Jul 15 2012
Typo in definition fixed by Reinhard Zumkeller, Aug 05 2015

A060432 Partial sums of A002024.

Original entry on oeis.org

1, 3, 5, 8, 11, 14, 18, 22, 26, 30, 35, 40, 45, 50, 55, 61, 67, 73, 79, 85, 91, 98, 105, 112, 119, 126, 133, 140, 148, 156, 164, 172, 180, 188, 196, 204, 213, 222, 231, 240, 249, 258, 267, 276, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 396, 407, 418
Offset: 1

Views

Author

Robert A. Stump (bobess(AT)netzero.net), Apr 06 2001

Keywords

Comments

In other words, first differences give A002024.
Equals A010054 convolved with [1, 2, 3, ...]. - Gary W. Adamson, Mar 16 2010

Examples

			a(7) = 1 + 2 + 2 + 3 + 3 + 3 + 4 = 18.
		

Crossrefs

Programs

  • Haskell
    a060432 n = sum $ zipWith (*) [n,n-1..1] a010054_list
    -- Reinhard Zumkeller, Dec 17 2011
    
  • Maple
    ListTools:-PartialSums([seq(n$n,n=1..10)]); # Robert Israel, Jan 28 2016
  • Mathematica
    a[n_] := Sum[Floor[1/2 + Sqrt[2*k]], {k, 1, n}]; Array[a, 60] (* Jean-François Alcover, Jan 10 2016 *)
    Accumulate[Table[PadRight[{},n,n],{n,15}]//Flatten] (* Harvey P. Dale, May 24 2025 *)
  • PARI
    f(n) = floor(1/2+sqrt(2*n))
    for(n=1,100,print1(sum(k=1,n,f(k)),","))
    
  • PARI
    { default(realprecision, 100); for (n=1, 1000, a=sum(k=1, n, floor(1/2 + sqrt(2*k))); write("b060432.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 05 2009
    
  • Python
    from math import isqrt
    def A060432(n): return (k:=(r:=isqrt(m:=n+1<<1))+int((m<<2)>(r<<2)*(r+1)+1)-1)*(k*(-k - 3) + 6*n - 2)//6 + n # Chai Wah Wu, Oct 16 2022

Formula

Let f(n) = floor(1/2 + sqrt(2*n)), then this function is S(n) = f(1) + f(2) + f(3) + ... + f(n).
a(n) is asymptotic to c*n^(3/2) with c=0.9428.... - Benoit Cloitre, Dec 18 2002
a(n) is asymptotic to c*n^(3/2) with c = (2/3)*sqrt(2) = .942809.... - Franklin T. Adams-Watters, Sep 07 2006
Set R = round(sqrt(2*n)), then a(n) = ((6*n+1)*R-R^3)/6. - Gerald Hillier, Nov 28 2008
G.f.: W(0)/(2*(1-x)^2), where W(k) = 1 + 1/( 1 - x^(k+1)/( x^(k+1) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 21 2013
a(n) = A000330(A003056(n)) + (A003056(n) + 1) * (n - A057944(n)). This represents a closed form, because all of the constituent sequences (i.e., A003056, A000330, A057944) have a known closed form. - Peter Kagey, Jan 28 2016
G.f.: x^(7/8)*Theta_2(0,x^(1/2))/(2*(1-x)^2) where Theta_2 is a Jacobi theta function. - Robert Israel, Jan 28 2016
G.f.: (x/(1 - x)^2)*Product_{k>=1} (1 - x^(2*k))/(1 - x^(2*k-1)). - Ilya Gutkovskiy, May 30 2017
a(n) = n*(k+1)-k*(k+1)*(k+2)/6 where k = A003056(n) is the largest integer such that k*(k+1)/2 <= n. - Bogdan Blaga, Feb 04 2021

Extensions

More terms from Jason Earls, Jan 08 2002

A057945 Number of triangular numbers needed to represent n with greedy algorithm.

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 1, 2, 3, 2, 1, 2, 3, 2, 3, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4, 2, 1, 2, 3, 2, 3, 4, 2, 3, 1, 2, 3, 2, 3, 4, 2, 3, 4, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 2, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 2, 3, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4, 2, 3, 4, 3, 2, 3, 4, 3
Offset: 0

Views

Author

Henry Bottomley, Oct 05 2000

Keywords

Comments

a(n) = sum of digits of A000462(n). - Reinhard Zumkeller, Mar 27 2011
The length of (number of moves in) Simon Norton's game in A006019 starting with an initial heap of n if both players always take, never put. - R. J. Mathar, May 13 2016

Examples

			a(35)=3 since 35=28+6+1
		

Crossrefs

Cf. A000217, A002262, A056944, A057944. See A006893 for records.

Programs

  • Haskell
    a057945 n = g n $ reverse $ takeWhile (<= n) $ tail a000217_list where
       g 0 _      = 0
       g x (t:ts) = g r ts + a where (a,r) = divMod x t
    -- Reinhard Zumkeller, Mar 27 2011
  • Maple
    A057945 := proc(n)
        local a,x;
        a := 0 ;
        x := n ;
        while x > 0 do
            x := x-A057944(x) ;
            a := a+1 ;
        end do:
        a ;
    end proc: # R. J. Mathar, May 13 2016
  • Mathematica
    A057944[n_] := With[{k = Floor[Sqrt[8n+1]]}, Floor[(k-1)/2]* Floor[(k+1)/2]/2];
    a[n_] := Module[{k = 0, x = n}, While[x>0, x = x - A057944[x]; k++]; k];
    Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Mar 10 2019, after R. J. Mathar *)

Formula

a(0)=0, otherwise a(n)=a(A002262(n))+1.

A061885 n + largest triangular number less than or equal to n.

Original entry on oeis.org

0, 2, 3, 6, 7, 8, 12, 13, 14, 15, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 35, 42, 43, 44, 45, 46, 47, 48, 56, 57, 58, 59, 60, 61, 62, 63, 72, 73, 74, 75, 76, 77, 78, 79, 80, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 132
Offset: 0

Views

Author

Henry Bottomley, May 12 2001

Keywords

Comments

A253607(a(n)) > 0. - Reinhard Zumkeller, Jan 05 2015
Also possible values of floor(x*floor(x)) for real x < 1. - Jianing Song, Feb 16 2021

Examples

			a(9) = 9+6 = 15;
a(10) = 10+10 = 20;
a(11) = 11+10 = 21.
		

Crossrefs

Cf. A060985.
Cf. A064801 (complement), A253607.

Programs

  • Haskell
    a061885 n = n + a057944 n  -- Reinhard Zumkeller, Feb 03 2012
    
  • Python
    from math import comb, isqrt
    def A061885(n): return n+comb((m:=isqrt(k:=n+1<<1))+(k>m*(m+1)),2) # Chai Wah Wu, Nov 09 2024

Formula

a(n) = n+A057944(n) = 2n-A002262(n) = n+[(sqrt(1+8*n)-1)/2]*[(sqrt(1+8*n)+1)/2]/2.
a(n) = A004201(n+1) - 1. - Franklin T. Adams-Watters, Jul 05 2009

A060985 a(1) = 1; a(n+1) = a(n) + (largest triangular number <= a(n)).

Original entry on oeis.org

1, 2, 3, 6, 12, 22, 43, 79, 157, 310, 610, 1205, 2381, 4727, 9383, 18699, 37227, 74355, 148660, 296900, 593735, 1187240, 2373810, 4746741, 9491481, 18981027, 37956907, 75910735, 151820416, 303627016, 607253419, 1214497244, 2428978214, 4857918665
Offset: 1

Views

Author

R. K. Guy, May 11 2001

Keywords

Comments

Arises in analyzing 'put-or-take' games (see Winning Ways, 484-486, 501-503), the prototype being Epstein's Put-or-Take-a-Square game.

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982.

Crossrefs

Programs

  • Haskell
    a060985 n = a060985_list !! (n-1)
    a060985_list = iterate a061885 1  -- Reinhard Zumkeller, Feb 03 2012
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[ {k = 1}, While[ k*(k + 1)/2 <= a[n - 1], k++ ]; a[n - 1] + k*(k - 1)/2]; Table[ a[n], {n, 1, 40} ]
    f[n_]:=Module[{c=Floor[(Sqrt[1+8n]-1)/2]},(c(c+1))/2]; NestList[#+f[#]&, 1, 40] (* Harvey P. Dale, Jun 19 2011 *)
  • PARI
    { default(realprecision, 1000); for (n=1, 1000, if (n<2, a=1, k=(sqrt(1 + 8*a) - 1)\2; a+=k*(k + 1)/2 ); write("b060985.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 16 2009
    

Formula

a(n+1) = a(n) + A061883(n) = a(n) + A057944(a(n)) = A061885(a(n)). - Henry Bottomley, May 12 2001
a(n) ~ 0.28276... * 2^n. - Charles R Greathouse IV, Jun 19 2011

Extensions

More terms from David W. Wilson, Henry Bottomley and Robert G. Wilson v, May 12 2001

A064578 Inverse permutation to A057027.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Oct 16 2001

Keywords

Comments

The sequence is an intra-block permutation of positive integers. - Boris Putievskiy, Mar 13 2024

Examples

			From _Boris Putievskiy_, Mar 13 2024: (Start)
Start of the sequence as a triangular array T(n,k) read by rows:
       k=1   2   3   4   5   6
  n=1:   1;
  n=2:   2,  3;
  n=3:   4,  6,  5;
  n=4:   7,  9, 10,  8;
  n=5:  11, 13, 15, 14, 12;
  n=6:  16, 18, 20, 21, 19, 17;
Row n contains a permutation block of the n numbers (n-1)*n/2+1, (n-1)*n/2+2, ..., (n-1)*n/2+n to themselves.
Subtracting (n-1)*n/2 from each term in row n gives A194959, in which each row is a permutation of 1..n:
  1;
  1, 2;
  1, 3, 2;
  1, 3, 4, 2;
  1, 3, 5, 4, 2;
  1, 3, 5, 6, 4, 2; (End)
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := (n - 1)*n/2 + Min[2*k - 1, 2*(n - k + 1)];
    Nmax = 6; Table[T[n, k], {n, 1, Nmax}, {k, 1, n}] // Flatten (* Boris Putievskiy, Mar 29 2024 *)
  • PARI
    a(n) = my(A = (sqrtint(8*n) + 1)\2, B = A*(A - 1)/2, C = n - B); B + if(C <= (A+1)\2, 2*C - 1, 2*(A - C + 1)) \\ Mikhail Kurkov, Mar 12 2024

Formula

From Boris Putievskiy, Mar 29 2024: (Start)
a(n) = A057944(n-1) + A194959(n).
T(n,k) = (n-1)*n/2 + min(2*k-1, 2*(n-k+1)), for 1 <= k <= n.
(End)

Extensions

More terms from Vladeta Jovovic, Oct 18 2001

A127739 Triangle read by rows, in which row n contains the triangular number T(n) = A000217(n) repeated n times; smallest triangular number greater than or equal to n.

Original entry on oeis.org

1, 3, 3, 6, 6, 6, 10, 10, 10, 10, 15, 15, 15, 15, 15, 21, 21, 21, 21, 21, 21, 28, 28, 28, 28, 28, 28, 28, 36, 36, 36, 36, 36, 36, 36, 36, 45, 45, 45, 45, 45, 45, 45, 45, 45, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
Offset: 1

Views

Author

Gary W. Adamson, Jan 27 2007

Keywords

Comments

Seen as a sequence, these are the triangular numbers applied to the Kruskal-Macaulay function A123578. - Peter Luschny, Oct 29 2022

Examples

			First few rows of the triangle are:
   1;
   3,  3;
   6,  6,  6;
  10, 10, 10, 10;
  15, 15, 15, 15, 15;
  ...
		

Crossrefs

Programs

  • Haskell
    a127739 n k = a127739_tabl !! (n-1) !! (k-1)
    a127739_row n = a127739_tabl !! (n-1)
    a127739_tabl = zipWith ($) (map replicate [1..]) $ tail a000217_list
    -- Reinhard Zumkeller, Feb 03 2012, Mar 18 2011
    
  • Maple
    A127739 := proc(n) local t, s; t := 1; s := 0;
    while t <= n do s := s + 1; t := t + s od; s*(1 + s)/2 end:
    seq(A127739(n), n = 1..66); # Peter Luschny, Oct 29 2022
  • Mathematica
    Table[n(n+1)/2,{n,100},{n}]//Flatten (* Zak Seidov, Mar 19 2011 *)
  • PARI
    A127739=n->binomial((sqrtint(8*n)+3)\2,2) \\ M. F. Hasler, Mar 09 2014
    
  • Python
    from math import isqrt
    def A127739(n): return (r:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(r+1)>>1 # Chai Wah Wu, Nov 07 2024

Formula

Central terms: T(2*n-1,n) = A000384(n). - Reinhard Zumkeller, Mar 18 2011
a(n) = A003057(n)*A002024(n)/2; a(n) = (t+2)*(t+1)/2, where t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Feb 08 2013
Sum_{n>=1} 1/a(n)^2 = 8 - 2*Pi^2/3. - Amiram Eldar, Aug 15 2022
a(n) = k(n)*(1 + k(n))/2 = A000217(A123578(n)), where k = A123578. - Peter Luschny, Oct 29 2022

Extensions

Name edited by Michel Marcus, Apr 30 2020

A006019 Remoteness number of n in Simon Norton's game of Tribulations.

Original entry on oeis.org

0, 1, 2, 1, 6, 3, 1, 5, 3, 2, 1, 2, 3, 4, 3, 1, 9, 3, 6, 7, 8, 1, 10, 3, 2, 3, 4, 5, 1, 4, 3, 8, 7, 5, 9, 7, 1, 14, 3, 4, 7, 4, 2, 9, 4, 1, 2, 3, 4, 7, 8, 12, 16, 9, 3, 1, 12, 3, 14, 7, 6, 4, 8, 6, 3, 2, 1, 6, 3, 5, 7, 11, 4
Offset: 0

Views

Author

Keywords

Comments

The game of Tribulations is similar to Epstein's game in A005240, but the number of chips to be put or taken is the largest triangular number not larger than C: C-> C +- A057944(C). The remoteness is the number of moves in the game if the initial heap has n chips and both players play the optimum strategy. - R. J. Mathar, May 06 2016

Examples

			For all positive triangular numbers (A000217) the remoteness is 1, because the starting player uses the strategy to take all of the chips and the game is over. The remoteness of 2 is 2, because taking one or putting one in the first move leads anyway to a n with remoteness 1. The remoteness of 4 is 6: 4 -> 7 -> 13 -> 23 -> 2 -> (1 or 3) -> 0. - _R. J. Mathar_, May 06 2016
		

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 502.
  • R. K. Guy, Fair Game: How to play impartial combinatorial games, COMAP's Mathematical Exploration Series, 1989; see p. 88.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A266726 for indices of even-valued terms (losing positions).

Extensions

Name and offset corrected by N. J. A. Sloane, Jan 03 2016

A061883 Largest triangular number less than or equal to sum of previous terms with a(0)=1.

Original entry on oeis.org

1, 1, 1, 3, 6, 10, 21, 36, 78, 153, 300, 595, 1176, 2346, 4656, 9316, 18528, 37128, 74305, 148240, 296835, 593505, 1186570, 2372931, 4744740, 9489546, 18975880, 37953828, 75909681, 151806600, 303626403, 607243825, 1214480970, 2428940451
Offset: 0

Views

Author

Henry Bottomley, May 12 2001

Keywords

Comments

a(5)=10 since 1+1+1+3+6=12 and 10 is the largest triangular number less than or equal to this.

Programs

  • Haskell
    a061883 n = a061883_list !! n
    a061883_list = 1 : zipWith (-) (tail a060985_list) a060985_list
    -- Reinhard Zumkeller, Feb 03 2012
  • Mathematica
    ltn[n_]:=Module[{c=Floor[(Sqrt[8*n+1]-1)/2]},(c(c+1))/2]; nxt[{t_, a_}] := Module[ {m = ltn[t]}, {t + m, m}]; Transpose[NestList[nxt,{1,1},40]] [[2]] (* Harvey P. Dale, Feb 12 2016 *)

Formula

a(n) = A060985(n+1)-A060985(n) = A057944(A060985(n)) = A000217(A003056(A060985(n)))

A112367 a(n) = A000217(n-k), where k is the largest triangular number less than n.

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 1, 3, 6, 0, 1, 3, 6, 10, 0, 1, 3, 6, 10, 15, 0, 1, 3, 6, 10, 15, 21, 0, 1, 3, 6, 10, 15, 21, 28, 0, 1, 3, 6, 10, 15, 21, 28, 36, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 0, 1, 3, 6, 10
Offset: 0

Views

Author

Amarnath Murthy, Sep 12 2005

Keywords

Examples

			a(9) = T(9-6) = T(3) = 6. 6 < 9 < 10.
		

Programs

Formula

a(n) = A000217(n-A057944(n)). - R. J. Mathar, Nov 05 2011
Showing 1-10 of 17 results. Next