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

A007952 Generated by a sieve: keep first number, drop every 2nd, keep first, drop every 3rd, keep first, drop every 4th, etc.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 17, 21, 29, 33, 41, 47, 57, 59, 77, 81, 101, 107, 117, 131, 149, 153, 173, 191, 209, 213, 239, 257, 273, 281, 321, 329, 359, 371, 401, 417, 441, 453, 497, 509, 539, 569, 611, 621, 647, 671, 717, 731, 779, 801, 839, 869, 917, 929, 989, 1001, 1053, 1067
Offset: 0

Views

Author

N. J. A. Sloane, R. Muller

Keywords

Comments

Also called the sieve of Tchoukaillon (or Mancala, or Kalahari).
If k+1 occurs at rank i for the first time, then i is given by the program: i = 0: for j = k to 1 step -1: i = 1 + i + int ( i / j ): next: - Claude Lenormand (claude.lenormand(AT)free.fr), Jan 15 2001
A082447(n+1) = (number of terms <= n); see A141262 for primes. - Reinhard Zumkeller, Jun 21 2008

References

  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11 (1957), 26-31.
  • M. Le, On the Smarandache n-ary Sieve, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 146-147.

Crossrefs

Programs

  • Haskell
    a007952 n = a007952_list !! n
    a007952_list = f 1 [0..] where
       f k (x:xs) = x : f (k + 1) (g xs) where
         g ws = us ++ (g vs) where (us, _:vs) = splitAt k ws
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Mathematica
    f[n_] := Fold[#2*Floor[#1/#2 + 1] &, n, Reverse@ Range[n - 1]]; Array[f, 55] (* From David Wilson *)
  • PARI
    a(n) = my(ret=0); forstep(k=n,1,-1, ret++; ret+=(-ret)%k); ret; \\ Kevin Ryde, Sep 30 2022

Formula

Equals A002491(n) - 1. Equals A108696 - 2.

Extensions

Corrected and extended by David W. Wilson

A082447 a(n) = the number k such that s(k)=0 where s(0)=n and s(i)=s(i-1)-(s(i-1) modulo (i+1)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Apr 25 2003

Keywords

Comments

a(n+1) = number of Mancala numbers <= n, see A007952; n occurs A028913(n-1) times consecutively. - Reinhard Zumkeller, Jun 21 2008
a(n) = number of ones <= n in A130747; see also A002491. - Reinhard Zumkeller, Jul 01 2009

Examples

			For n=4, s(0)=4, 4 ->4-4 mod 1=4 ->4-4 mod 2=4 ->4-4 mod 3=3 ->3-3 mod 4=0, hence s(4)=0 and a(4)=4.
For n=6, s(0)=6, s(1)=6-6 mod 2=6, s(2)=6-6 mod 3=6, s(3)=6-6 mod 4=6-2=4, s(4)=4-4 mod 5=0, hence a(6)=4.
		

Crossrefs

Programs

  • Mathematica
    Flatten@Table[First@Position[Rest@FoldList[#1-Mod[#1,#2]&,i,Range[2,i+1]],0], {i,30}] (* Birkas Gyorgy, Feb 26 2011 *)
  • PARI
    a(n)=if(n<1, 0, s=n; c=1; while(s-s%c>0, s=s-s%c; c++); c--) \\ corrected by Dan Dima, Jan 18 2025

Formula

Conjecture: a(n) = sqrt(Pi*n) + O(1)
a(n) = A073047(n) - 1.

Extensions

Name corrected by Dan Dima, Jan 18 2025

A028913 First differences of A007952.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 4, 8, 4, 8, 6, 10, 2, 18, 4, 20, 6, 10, 14, 18, 4, 20, 18, 18, 4, 26, 18, 16, 8, 40, 8, 30, 12, 30, 16, 24, 12, 44, 12, 30, 30, 42, 10, 26, 24, 46, 14, 48, 22, 38, 30, 48, 12, 60, 12, 52, 14, 54, 52, 26, 12, 66, 54, 60, 10, 26, 60, 60, 10, 74, 30, 52, 56, 64, 14, 34
Offset: 0

Views

Author

Keywords

Crossrefs

Extensions

More terms from Reinhard Zumkeller, Jun 21 2008

A140061 Triangle of quotients.

Original entry on oeis.org

1, 3, 2, 5, 4, 3, 9, 8, 6, 4, 11, 10, 9, 8, 5, 17, 16, 15, 12, 10, 6, 21, 20, 18, 16, 15, 12, 7, 29, 28, 27, 24, 20, 18, 14, 8, 33, 32, 30, 28, 25, 24, 21, 16, 9, 41, 40, 39, 36, 35, 30, 28, 24, 18, 10, 47, 46, 45, 44, 40, 36, 35, 32, 27, 20, 11, 57, 56, 54, 52, 50, 48, 42, 40, 36
Offset: 1

Views

Author

Clark Kimberling, May 03 2008

Keywords

Comments

Column 1 is essentially A007952. - Clark Kimberling, Aug 27 2008

Examples

			First 6 rows:
1
3 2
5 4 3
9 8 6 4
11 10 9 8 5
17 16 15 12 10 6
		

Crossrefs

Cf. A140060.
Cf. A007952.

Programs

  • Mathematica
    Flatten@Table[Reverse@FoldList[#2*Floor[#1/#2+1]&,i,Reverse@Range[i-1]],{i,10}] (* Birkas Gyorgy, Feb 26 2011 *)

Formula

The triangular subarray of A140060 consisting of rows whose terms are distinct. If n is the first term in a row (i.e., if n is a term of A082447), then Q(n,1)=n, Q(n,k)=k*Floor(Q(n,k-1)/k).
Showing 1-4 of 4 results.