A048859
A sieve: keep the first 2 numbers, delete the next 3 numbers; keep the next 3 numbers, delete the next 4 numbers; keep the next 4 numbers, delete the next 5 numbers; and so on. In other words, keep the next k numbers and delete the next k+1 numbers, for k = 2, 3, ...
Original entry on oeis.org
1, 2, 6, 7, 8, 13, 14, 15, 16, 22, 23, 24, 25, 26, 33, 34, 35, 36, 37, 38, 46, 47, 48, 49, 50, 51, 52, 61, 62, 63, 64, 65, 66, 67, 68, 78, 79, 80, 81, 82, 83, 84, 85, 86, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128
Offset: 1
Charles T. Le (charlestle(AT)yahoo.com)
List the natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
Keep the first two numbers 1, 2 and delete the next three numbers 3, 4, 5.
Keep the next three numbers 6, 7, 8 and delete the next four numbers 9, 10, 11, 12. And so on.
- C. Dumitrescu & V. Seleacu, editors, Some Notions and Questions in Number Theory, Vol. I, Erhus Publ., Glendale, 1994.
- M. Le, On the Smarandache n-ary Sieve, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 146-147.
- F. Smarandache, Properties of Numbers, 1972.
-
a048859 n = a048859_list !! (n-1)
a048859_list = f 2 [1..] where
f k xs = us ++ f (k + 1) (drop (k + 1) vs)
where (us, vs) = splitAt k xs
-- Reinhard Zumkeller, May 16 2014
-
ss[n_]:=Module[{c=n^2+4n+1},Range[c,c+n+1]]; Flatten[Array[ss,10,0]] (* Harvey P. Dale, Sep 10 2014 *)
Corrected and revised by the author, Mar 24 2004
A073047
Least k such that x(k)=0 where x(1)=n and x(k)=k*floor(x(k-1)/k).
Original entry on oeis.org
2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16
Offset: 1
If x(1)=4, x(2)= 2*floor(4/2)=4, x(3)=3*floor(4/3)=3; x(4)=4*floor(3/4)=0 hence a(4)=4.
-
f:= proc(n,k) option remember;
if n = 0 then return k-1 fi;
procname(k*floor(n/k),k+1)
end proc:
map(f, [$1..100], 1); # Robert Israel, Jul 25 2019
-
a[n_] := Module[{x}, x[1] = n; x[k_] := x[k] = k Floor[x[k-1]/k]; For[k = 1, True, k++, If[x[k] == 0, Return[k]]]];
Array[a, 100] (* Jean-François Alcover, Jun 07 2020 *)
-
a(n)=if(n<0,0,s=n; c=1; while(s-s%c>0,s=s-s%c; c++); c)
A108696
Generated by a sieve: see comments.
Original entry on oeis.org
1, 2, 3, 5, 7, 11, 13, 19, 23, 31, 35, 43, 49, 59, 61, 79, 83, 103, 109, 119, 133, 151, 155, 175, 193, 211, 215, 241, 259, 275, 283, 323, 331, 361, 373, 403, 419, 443, 455, 499, 511, 541, 571, 613, 623, 649, 673, 719, 733, 781, 803, 841, 871, 919
Offset: 1
-
a108696 n = a108696_list !! (n-1)
a108696_list = 1 : sieve' 2 [2..] where
sieve' n (x:xs) = x : (sieve' (n+1) $ sieving xs) where
sieving xs = (take (n-1) xs) ++ (sieving $ drop n xs)
-- Reinhard Zumkeller, Jul 04 2011
-
source /tclutils/utils.tcl
set l [range 0 10000]; set z z
for {set i 2} {$i*2 <= [llength $l]} {incr i} {
set k [expr {[llength $l]-1}]
set k [expr {$k - ($k % $i)}]
while {$k > $i} {
set l [lreplace $l $k $k]
incr k -$i
}
puts "after $i: length [llength $l], prefix [join [lrange $l 0 10] { }]"
}
A140060
Array of quotients.
Original entry on oeis.org
1, 2, 2, 3, 2, 4, 4, 3, 5, 4, 3, 6, 6, 6, 4, 7, 6, 6, 4, 8, 8, 6, 4, 9, 8, 6, 4, 10, 10, 9, 8, 5, 11, 10, 9, 8, 5, 12, 12, 12, 12, 10, 6, 13, 12, 12, 12, 10, 6, 14, 14, 12, 12, 10, 6, 15, 14, 12, 12, 10, 6, 16, 16, 15, 12, 10, 6, 17, 16, 15, 12, 10, 6, 18, 18, 18, 16, 15, 12, 7, 19, 18, 18
Offset: 1
First 8 rows:
1
2 2
3 2
4 4 3
5 4 3
6 6 6 4
7 6 6 4
8 8 6 4
For row 5: Q(5,1)=5, Q(5,2)=2*[5/2]=4, Q(5,3)=3*[4/3]=3.
A204539
a(n) is the number of integers N=4k whose "basin" sequence (cf. comment) ends in n^2.
Original entry on oeis.org
1, 1, 1, 2, 1, 3, 2, 4, 2, 4, 3, 5, 1, 9, 2, 10, 3, 5, 7, 9, 2, 10, 9, 9, 2, 13, 9, 8, 4, 20, 4, 15, 6, 15, 8, 12, 6, 22, 6, 15, 15, 21, 5, 13, 12, 23, 7, 24, 11, 19, 15, 24, 6, 30, 6, 26, 7, 27, 26, 13, 6, 33, 27, 30, 5, 13, 30, 30, 5, 37, 15, 26, 28, 32, 7, 17, 25, 54, 9, 30, 21, 41, 25
Offset: 2
For integers N=4,8,12,16,... we have the following sequences:
{4}
{8, 9} (8 -> the next higher odd multiple of 3, which is 9 -> STOP)
{12, 15, 16} (12 -> 3*5=15 -> 4*4=16 -> STOP)
{16, 21, 24, 25}
{20, 21, 24, 25}
{24, 27, 32, 35, 36}
{28, 33, 40, 45, 48, 49}
{32, 33, 40, 45, 48, 49}
{36, 39, 40, 45, 48, 49}
...
Thus there is 1 integer N=4k ending in the sea at 2^2, whence basin a(2)=1, and idem for 3 and 4.
The two integers 16 and 20 end at 5^2, so the basin of 5 is a(5)=2.
There is again a(6)=1 integer ending in 6^2, while the basin of 7 are the 3 integers 28, 32, and 36, which all merge into the "river" that enters the "sea" in 7^2=49.
Thus the first 6 terms in the sequence are 1, 1, 1, 2, 1, 3.
Take N=100 as an example: the next integer on the same line is the next higher odd multiple of 3, i.e., smallest 3*(2m+1) > 100, which is 105. The next number is the least even multiple of 4, 4*(2m) = 112, etc., leading to 115 = 5*(2m+1), followed by 120 = 6*(2m), 133 = 7*(2m+1), 144 = 8*2m (where we have a square, but not the square of 8), 153 =9*(2m+1), 160 = 10*2m, 165 = 11*(2m+1), 168 = 12*(2m) and finally 169 = 13*13.
- Ray Chandler, Table of n, a(n) for n = 2..10001
- Mark Dukes, Fagan's Construction, Strange Roots, and Tchoukaillon Solitaire, Journal of Integer Sequences, Vol. 24 (2021), Article 21.7.1.
- Mark Dukes, Fagan's Construction, Strange Roots, and Tchoukaillon Solitaire, arXiv:2202.02381 [math.NT], 2022.
-
cumul[n_Integer] := Module[{den1 = n, num = n^2, den2}, While[num > 4 && den1 != 2, num = num - 1; den1 = den1 - 1; den2 = Floor[num/den1]; If[Not[EvenQ[den1 + den2]], den2 = den2 - 1]; num = den1 den2]; Return[num/4]]; basin[2] := 1; basin[n_Integer] := cumul[n] - cumul[n - 1]; Table[basin[n], {n, 2, 75}] (* Alonso del Arte, Jan 19 2012 *)
-
bs(n,s,m=2)={while(n>m^2,n=(n\m+++2-bittest(n\m-m,0))*m; s & print1(n","));n}
n=4; for(c=2,50, for(k=1,9e9, bs(n+=4)==c^2 || print1(k",")||break)) \\ M. F. Hasler, Jan 20 2012
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
First 6 rows:
1
3 2
5 4 3
9 8 6 4
11 10 9 8 5
17 16 15 12 10 6
-
Flatten@Table[Reverse@FoldList[#2*Floor[#1/#2+1]&,i,Reverse@Range[i-1]],{i,10}] (* Birkas Gyorgy, Feb 26 2011 *)
A357431
Triangle read by rows where each term in row n is the next greater multiple of n..1.
Original entry on oeis.org
1, 2, 3, 3, 4, 5, 4, 6, 8, 9, 5, 8, 9, 10, 11, 6, 10, 12, 15, 16, 17, 7, 12, 15, 16, 18, 20, 21, 8, 14, 18, 20, 24, 27, 28, 29, 9, 16, 21, 24, 25, 28, 30, 32, 33, 10, 18, 24, 28, 30, 35, 36, 39, 40, 41, 11, 20, 27, 32, 35, 36, 40, 44, 45, 46, 47
Offset: 1
Triangle begins:
n/k| 1 2 3 4 5 6 7
--------------------------------
1 | 1;
2 | 2, 3;
3 | 3, 4, 5;
4 | 4, 6, 8, 9;
5 | 5, 8, 9, 10, 11;
6 | 6, 10, 12, 15, 16, 17;
7 | 7, 12, 15, 16, 18, 20, 21;
...
For row n=6, the numbers of the chain, and below them their divisors are:
6 10 12 15 16 17
6 5 4 3 2 1
-
row[n_] := Module[{k = n, s = Table[0, n], r}, s[[1]] = n;Do[k++; k += If[(r = Mod[k, i]) == 0, 0, i - Mod[k, i]]; s[[n+1-i]] = k, {i, n - 1, 1, -1}]; s]; Array[row, 11] // Flatten (* Amiram Eldar, Sep 28 2022 *)
-
row(n) = my(v=vector(n)); v[1] = n; for (k=2, n, v[k] = v[k-1] + (n-k+1) - (v[k-1] % (n-k+1));); v; \\ Michel Marcus, Nov 16 2022
A357498
Triangle read by rows where each term in row n is the next greater multiple of n..1 divided by n..1.
Original entry on oeis.org
1, 1, 3, 1, 2, 5, 1, 2, 4, 9, 1, 2, 3, 5, 11, 1, 2, 3, 5, 8, 17, 1, 2, 3, 4, 6, 10, 21, 1, 2, 3, 4, 6, 9, 14, 29, 1, 2, 3, 4, 5, 7, 10, 16, 33, 1, 2, 3, 4, 5, 7, 9, 13, 20, 41, 1, 2, 3, 4, 5, 6, 8, 11, 15, 23, 47, 1, 2, 3, 4, 5, 6, 8, 10, 13, 18, 28, 57
Offset: 1
Triangle begins:
n/k| 1 2 3 4 5 6 7
--------------------------------
1 | 1;
2 | 1, 3;
3 | 1, 2, 5;
4 | 1, 2, 4, 9;
5 | 1, 2, 3, 5, 11;
6 | 1, 2, 3, 5, 8, 17;
7 | 1, 2, 3, 4, 6, 10, 21;
...
For row n=6, we have:
A357431 row 6 10 12 15 16 17
divided by 6 5 4 3 2 1
results in 1 2 3 5 8 17
-
row[n_] := Module[{k = n, s = Table[0, n], r}, s[[1]] = 1; Do[k++; k += If[(r = Mod[k, i]) == 0, 0, i - Mod[k, i]]; s[[n + 1 - i]] = k/i, {i, n - 1, 1, -1}]; s]; Array[row, 12] // Flatten (* Amiram Eldar, Oct 01 2022 *)
-
row(n) = my(v=vector(n)); v[1] = n; for (k=2, n, v[k] = v[k-1] + (n-k+1) - (v[k-1] % (n-k+1));); vector(n, k, v[k]/(n-k+1)); \\ Michel Marcus, Nov 16 2022
A386520
Column sums of the triangle in A386755.
Original entry on oeis.org
1, 5, 13, 13, 31, 35, 57, 61, 85, 85, 111, 99, 235, 89, 353, 173, 171, 341, 343, 229, 489, 423, 415, 435, 661, 525, 535, 559, 1161, 427, 931, 653, 1201, 787, 941, 885, 1629, 537, 1443, 1839, 1723, 931, 1119, 1525, 2415, 741, 2257, 2327, 1947, 2005, 2767, 1131, 3181, 1055, 3131, 2147
Offset: 1
Triangle whose columns are summed.
m/n| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
----------------------------------------------------------------
1 | 1
2 | 1
3 | 2 1
4 | 2 1
5 | 3 2 1
6 | 3 2 1
7 | 3 2 1
8 | 3 2 1
9 | 4 3 2 1
10 | 4 3 2 1
11 | 5 4 3 2 1
12 | 5 4 3 2 1
13 | 5 4 3 2 1
14 | 5 4 3 2 1
15 | 5 4 3 2 1
16 | 5 4 3 2 1
17 | 6 5 4 3 2 1
18 | 6 5 4 3 2 1
19 | 6 5 4 3 2 1
20 | 6 5 4 3 2 1
...
The completed column for n=5 is definitely fully visible here because in column 6 for n=6 the divisor k=6 already appeared. That means that column 5 cannot have more divisors in it under the last k=5 in row 17 because in that row only k=7 may follow k=6 in theory, but 7 does not divide 5. So, all similarly proven, definitely fully visible completed columns in this sample array are readily summable by sight. E.g. column 5: a(5) = 1 + 5 + 5 + 5 + 5 + 5 + 5 = 31.
Cf.
A007952 (row number where k=n first appears).
-
\\ uses row(n) from A386755
a(n) = my(ok=1, k=1, last=-1, s=0, r); while(ok, r=row(k); if (#r >= n, s+=r[n]); k++; if (#r>=n, if ((last==n) && (r[n]==0), ok = 0, last = r[n]))); s; \\ Michel Marcus, Aug 02 2025
-
\\ uses row(n) from A386755
lista(nn) = my(ok=1, k=1, vlast=vector(nn,i,-1), vs=vector(nn)); while(ok, my(r=row(k)); for (i=1, nn, if (#r>=i, vs[i]+=r[i])); k++; my(nbok=0); for (i=1, nn, if (#r>=i, if ((vlast[i]==i) && (r[i]==0), nbok++, vlast[i] = r[i]))); if (nbok == nn, ok = 0);); vs; \\ Michel Marcus, Aug 02 2025
A141262
Mancala numbers that are prime numbers.
Original entry on oeis.org
3, 5, 11, 17, 29, 41, 47, 59, 101, 107, 131, 149, 173, 191, 239, 257, 281, 359, 401, 509, 569, 647, 839, 929, 1277, 1427, 1487, 1847, 1931, 2039, 2339, 2579, 2939, 4451, 4457, 4799, 4931, 5231, 5381, 5717, 5741, 6029, 6317, 6833, 7451, 7547, 7901, 9011, 9437
Offset: 1
-
f[n_] := Fold[#2*Floor[#1/#2 + 1] &, n, Reverse@ Range[n - 1]]; a007952=Array[f, 170] ;Select[a007952,PrimeQ] (* James C. McMahon, Jul 19 2025 *)
Comments