A370974
A260850 sorted into increasing order and duplicates omitted.
Original entry on oeis.org
1, 2, 6, 20, 24, 120, 140, 858, 924, 1008, 1120, 1430, 10080, 11088, 12012, 22880, 176358, 388960, 1662804, 1750320, 3879876, 4056234, 9694845, 10029150, 10400600, 10816624, 33256080, 270415600, 280816200, 290845350, 300540195, 1037158320, 1452021648, 3181073742, 3267048708, 9617286240, 13784652882, 20583576819, 35263382880, 120880802196
Offset: 1
- Michael De Vlieger, Table of n, a(n) for n = 1..3365
- Michael De Vlieger, Plot p(i)^m(i) | a(n) at (x,y) = (n,i), n = 1..2048, with a color function where black indicates m(i) = 1, red indicates m(i) = 2, ..., magenta indicates the largest m(i) for n <= 2048.
A008336
a(n+1) = a(n)/n if n|a(n) else a(n)*n, a(1) = 1.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 20, 140, 1120, 10080, 1008, 11088, 924, 12012, 858, 12870, 205920, 3500640, 194480, 3695120, 184756, 3879876, 176358, 4056234, 97349616, 2433740400, 93605400, 2527345800, 90262350, 2617608150, 87253605, 2704861755, 86555576160, 2856334013280
Offset: 1
- P. Erdos, On the product of consecutive integers, J. London Math. Soc., 14 (1939), 194-198.
- Indranil Ghosh, Table of n, a(n) for n = 1..2732 (terms 1..1000 from T. D. Noe)
- R. K. Guy and R. Nowakowski, Unsolved Problems, Amer. Math. Monthly, vol. 102 (1995), 921-926; circa page 924.
- R. K. Guy and R. Nowakowski, Annotated extract from previous link
- Nick Hobson, Python program for this sequence
- N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).
- Index entries for sequences related to Recamán's sequence
Cf.
A005132 (the original Recaman sequence).
Cf. also
A195504 = Product of numbers up to n-1 used as divisors in
A008336(n), n >= 2; a(1) = 1.
-
a008336 n = a008336_list !! (n-1)
a008336_list = 1 : zipWith (/*) a008336_list [1..] where
x /* y = if x `mod` y == 0 then x `div` y else x*y
-- Reinhard Zumkeller, Feb 22 2012, Oct 25 2010
-
A008336 := proc(n) option remember; if n = 1 then 1 elif A008336(n-1) mod (n-1) = 0 then A008336(n-1)/(n-1) else A008336(n-1)*(n-1); fi; end;
-
a[n_] := a[n] = If[ Divisible[ a[n-1], n-1], a[n-1]/(n-1), a[n-1]*(n-1)]; a[1] = 1; Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Dec 02 2011 *)
nxt[{n_,a_}]:={n+1,If[Divisible[a,n],a/n,n*a]}; Transpose[ NestList[ nxt,{1,1},30]][[2]] (* Harvey P. Dale, May 09 2016 *)
-
from functools import lru_cache
@lru_cache(maxsize=None)
def A008336(n):
if n == 1: return 1
a, b = divmod(c:=A008336(n-1),n-1)
return c*(n-1) if b else a # Chai Wah Wu, Apr 11 2024
A371906
a(n) = sum of 2^(k-1) such that floor(n/prime(k)) is odd.
Original entry on oeis.org
0, 1, 3, 2, 6, 5, 13, 12, 14, 11, 27, 24, 56, 49, 55, 54, 118, 117, 245, 240, 250, 235, 491, 488, 492, 461, 463, 454, 966, 961, 1985, 1984, 2002, 1939, 1951, 1948, 3996, 3869, 3903, 3898, 7994, 7985, 16177, 16160, 16166, 15911, 32295, 32292, 32300, 32297, 32363
Offset: 1
a(1) = 0 since n = 1 is the empty product.
a(2) = 1 since for n = prime(1) = 2, floor(2/2) = 1 is odd. Therefore a(2) = 2^(1-1) = 1.
a(3) = 3 since for n = 3 and prime(1) = 2, floor(3/2) = 1 is odd, and for prime(2) = 3, floor(3/3) = 1 is odd. Hence a(3) = 2^(1-1) + 2^(2-1) = 1 + 2 = 3.
a(4) = 2 since for n = 4 and prime(1) = 2, floor(4/2) = 2 is even, but for prime(2) = 3, floor(4/3) = 1 is odd. Therefore, a(n) = 2^(2-1) = 2.
a(5) = 6 since for n = 5, though floor(5/2) = 2 is even, floor(5/3) and floor(5/5) are both odd. Therefore, a(n) = 2^(2-1) + 2^(3-1) = 2 + 4 = 6, etc.
Table relating a(n) with b(n), diagramming powers of 2 with "x" that sum to a(n), or prime factors with "x" that produce b(n), where b(n) = A372000(n).
Power of 2
n a(n) 01234567 b(n)
----------------------------
1 0 . 1
2 1 x 2
3 3 xx 6
4 2 .x 3
5 6 .xx 15
6 5 x.x 10
7 13 x.xx 70
8 12 ..xx 35
9 14 .xxx 105
10 11 xx.x 42
11 27 xx.xx 462
12 24 ...xx 77
13 56 ...xxx 1001
14 49 x...xx 286
15 55 xxx.xx 4290
16 54 .xx.xx 2145
17 118 .xx.xxx 36465
18 117 x.x.xxx 24310
19 245 x.x.xxxx 461890
20 240 ....xxxx 46189
----------------------------
1111
23571379
Prime factor
-
Table[Total[2^(-1 + Select[Range@ PrimePi[n], OddQ@ Quotient[n, Prime[#]] &])], {n, 50}]
-
a(n) = sum(k=1, primepi(n), if (n\prime(k) % 2, 2^(k-1))); \\ Michel Marcus, Apr 16 2024
A372000
a(n) = product of primes p such that floor(n/p) is odd.
Original entry on oeis.org
1, 2, 6, 3, 15, 10, 70, 35, 105, 42, 462, 77, 1001, 286, 4290, 2145, 36465, 24310, 461890, 46189, 969969, 176358, 4056234, 676039, 3380195, 520030, 1560090, 111435, 3231615, 430882, 13357342, 6678671, 220396143, 25928958, 907513530, 151252255, 5596333435, 589087730, 22974421470, 2297442147
Offset: 1
a(1) = 1 since n = 1 is the empty product.
a(2) = 2 since for n = 2, floor(n/p) = floor(2/2) = 1 is odd.
a(3) = 6 since for n = 3 and p = 2, floor(3/2) = 1 is odd, and for p = 3, floor(3/3) = 1 is odd. Hence a(3) = 2*3 = 6.
a(4) = 3 since for n = 4 and p = 2, floor(4/2) = 2 is even, but for p = 3, floor(4/3) = 1 is odd. Therefore, a(n) = 3.
a(5) = 15 since for n = 5, though floor(5/2) = 2 is even, floor(5/3) and floor(5/5) are both odd. Therefore, a(n) = 3*5 = 15, etc.
Table relating a(n) with b(n), diagramming prime factors with "x" that produce a(n), or powers of 2 with "x" that sum to b(n), where b(n) = A371906(n).
Prime factor
1111
n b(n) 23571379 b(n)
----------------------------
1 1 . 0
2 2 x 1
3 6 xx 3
4 3 .x 2
5 15 .xx 6
6 10 x.x 5
7 70 x.xx 13
8 35 ..xx 12
9 105 .xxx 14
10 42 xx.x 11
11 462 xx.xx 27
12 77 ...xx 24
13 1001 ...xxx 56
14 286 x...xx 49
15 4290 xxx.xx 55
16 2145 .xx.xx 54
17 36465 .xx.xxx 118
18 24310 x.x.xxx 117
19 461890 x.x.xxxx 245
20 46189 ....xxxx 240
----------------------------
01234567
Power of 2
-
Table[Times @@ Select[Prime@ Range@ PrimePi[n], OddQ@ Quotient[n, #] &], {n, 40}] (* or *)
Table[Product[Prime[i], {j, 1 + Floor[PrimePi[n]/2]}, {i, 1 + PrimePi[Floor[n/(2 j)]], PrimePi[Floor[n/(2 j - 1)]]}], {n, 40}]
-
a(n) = vecprod(select(x->((n\x) % 2), primes([1, n]))); \\ Michel Marcus, Apr 16 2024
-
print([prod(p for p in prime_range(n + 1) if is_odd(n//p)) for n in range(1, 41)])
# Peter Luschny, Apr 16 2024
Showing 1-4 of 4 results.
Comments