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

A095114 a(1)=1. a(n) = a(n-1) + (number of elements of {a(1),...,a(n-1)} that are <= n-1).

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 24, 29, 34, 39, 45, 51, 57, 63, 70, 77, 84, 91, 99, 107, 115, 123, 132, 141, 150, 159, 168, 178, 188, 198, 208, 218, 229, 240, 251, 262, 273, 285, 297, 309, 321, 333, 345, 358, 371, 384, 397, 410, 423, 437, 451, 465, 479, 493, 507, 522
Offset: 1

Views

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Comments

Every positive integer is either of the form a(n)+n-1 or of the form a(n+1)-a(n)+n, but not both.
The sequence a(n)+n-1 is A109512. - Robert Price, Apr 16 2013
The sequence a(n+1)-a(n)+n is A224731. - Robert Price, Apr 16 2013
Equals A001463 + 1, the partial sums of Golomb's sequence A001462. - Ralf Stephan, May 28 2004
a(n) is the position of the first occurrence of n in A001462, i.e., A001462(a(n)) = n and A001462(m) < n for m < a(n). - Reinhard Zumkeller, Feb 09 2012 [Explanation added and first inequality corrected from A001462(m) < m by Glen Whitney, Oct 06 2015]

Examples

			3 elements of {a(1),...,a(4)} are <= 4, so a(5) = a(4) + 3 = 9.
		

Crossrefs

Equals A001463(n) + 1.

Programs

  • Haskell
    a095114 n = a095114_list !! (n-1)
    a095114_list = 1 : f [1] 1 where
       f xs@(x:_) k = y : f (y:xs) (k+1) where
         y = x + length [z | z <- xs, z <= k]
    -- Reinhard Zumkeller, Feb 09 2012
  • Maple
    a[1]:= 1; m:= 0;
    for n from 2 to 100 do
      if a[m+1] <= n-1 then m:= m+1 fi;
      a[n]:= a[n-1]+m;
    od:
    seq(a[i],i=1..100); # Robert Israel, Oct 07 2015
  • Mathematica
    a[1]=1; a[n_]:=a[n]=a[n-1]+Length[Select[a/@Range[n-1], #
    				
  • PARI
    a(n) = sum(k=1, n-1, t(k)) + 1;
    t(n)=local(A, t, i); if(n<3, max(0, n), A=vector(n); t=A[i=2]=2; for(k=3, n, A[k]=A[k-1]+if(t--==0, t=A[i++ ]; 1)); A[n]);
    vector(100, n, a(n)) \\ Altug Alkan, Oct 06 2015
    

A224731 b(n+1) - b(n) + n where b(n) = A095114(n).

Original entry on oeis.org

2, 4, 5, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75
Offset: 1

Views

Author

Robert Price, Apr 16 2013

Keywords

Comments

This sequence, requested in A095114, is a companion to A109512.
Every positive integer is either of the form a(n)+n-1 (A109512) or of the form a(n+1)-a(n)+n (A224731), but not both.

Crossrefs

Cf. A095114.

A342711 Partial sums of A000267.

Original entry on oeis.org

1, 3, 6, 9, 13, 17, 22, 27, 32, 38, 44, 50, 57, 64, 71, 78, 86, 94, 102, 110, 119, 128, 137, 146, 155, 165, 175, 185, 195, 205, 216, 227, 238, 249, 260, 271, 283, 295, 307, 319, 331, 343, 356, 369, 382, 395, 408, 421, 434, 448, 462, 476, 490, 504, 518, 532, 547
Offset: 0

Views

Author

Slav E. Angelov, Mar 19 2021

Keywords

Comments

a(n) = A109512(n+1) for n = 0..23.
This sequence is the partial sums of A000267, which in turn is the partial sums of A240025.
It can be used to obtain a formula for the n-th term of A342712.

Crossrefs

Programs

  • Mathematica
    Accumulate @ Array[Floor @ Sqrt[4*# + 1] &, 100, 0] (* Amiram Eldar, Mar 19 2021 *)
  • PARI
    a(n) = sum(i=0, n, sqrtint(4*i+1)); \\ Michel Marcus, Mar 19 2021
Showing 1-3 of 3 results.