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.

A370969 First differences of A337486.

Original entry on oeis.org

5, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 1, 1, 4, 2, 2, 4, 2, 6, 2, 2, 2, 6, 4, 2, 2, 4, 2, 1, 1, 1, 3, 1, 1, 4, 2, 4, 1, 3, 2, 2, 1, 3, 2, 2, 4, 2, 2, 1, 1, 6, 4, 1, 1, 2, 4, 2, 2, 3, 1, 2, 1, 1, 4, 1, 1, 3, 3, 2, 4, 2, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2, 2, 6
Offset: 1

Views

Author

N. J. A. Sloane, Apr 11 2024

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A370969_gen(): # generator of terms
        c, m = 1, 1
        for n in count(2):
            a, b = divmod(c,n)
            if not b:
                yield n-m
                c, m = a, n
            else:
                c *= n
    A370969_list = list(islice(A370969_gen(),30)) # Chai Wah Wu, Apr 11 2024

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

Views

Author

Keywords

Comments

The graph of log_10(a(n)+1) seems to suggest that log(a(n)) is asymptotic to C*n where C is approximately 0.8. - Daniel Forgues, Sep 18 2011
Comments from N. J. A. Sloane, Apr 14 2024: (Start)
See A370968 for the terms in increasing order with duplicates omitted.
See A337486 and A195504 for the n such that a(n+1) = a(n)/n.
Guy and Nowakowski give bounds on a(n).
Theorem: 1 is the only repeated term.
Proof: Write a(n) for A008336(n).
Suppose, seeking a contradiction, that for 1 < r < s we have a(r) = a(s).
This means that a(r)*r^e_0*(r+1)^e_1*(r+2)^e_2*...(s-1)^e_t = a(s) = a(r),
where the exponents e_* are +1 or -1. The product (P1, say) of the terms with exponent +1 must equal the product (P2, say) of the terms with exponent -1. Since r>1, we need s >= r+2.
The product P1*P2 = P1^2 of all these terms is (s-1)!/(r-1)!.
But this contradicts Erdos's theorem (Erdos 1939) that the product of two or more consecutive integers is never a square. QED.
(End)

References

  • P. Erdos, On the product of consecutive integers, J. London Math. Soc., 14 (1939), 194-198.

Crossrefs

Cf. A005132 (the original Recaman sequence).
A065422 and A260850 are variants of the present sequence.
Cf. also A195504 = Product of numbers up to n-1 used as divisors in A008336(n), n >= 2; a(1) = 1.
Cf. also A337486, A370968.

Programs

  • Haskell
    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
    
  • Maple
    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;
  • Mathematica
    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 *)
  • Python
    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

A370968 A008336 sorted and duplicates removed.

Original entry on oeis.org

1, 2, 6, 20, 24, 120, 140, 858, 924, 1008, 1120, 10080, 11088, 12012, 12870, 176358, 184756, 194480, 205920, 3500640, 3695120, 3879876, 4056234, 87253605, 90262350, 93605400, 97349616, 2433740400, 2527345800, 2617608150, 2704861755, 57176602275, 79526843550, 81676217700, 84009823920, 86555576160, 2630123704650, 2687300306925, 2856334013280
Offset: 1

Views

Author

N. J. A. Sloane, Apr 11 2024

Keywords

Comments

In fact 1 is the only repeated term in A008336 (see that entry for proof).

Examples

			From _Michael De Vlieger_, Apr 11 2024: (Start)
Table of first terms showing exponents of prime factors p | a(n), with "." signifying p^0.
                 primes
                     1111
   n       a(n)  23571379
  -----------------------
   1         1   .
   2         2   1
   3         6   11
   4        20   2.1
   5        24   31
   6       120   311
   7       140   2.11
   8       858   11..11
   9       924   21.11
  10      1008   42.1
  11      1120   5.11
  12     10080   5211
  13     11088   42.11
  14     12012   21.111
  15     12870   121.11
  16    176358   11.1.111
  17    184756   2...1111
  18    194480   4.1.111
  19    205920   521.11
  20   3500640   521.111 (End)
		

Crossrefs

A352101 The numbers formed by removing the required prime factors to form the number from a set which is initially empty and that has primes added via the addition of the missing prime factors of numbers which cannot be created from those currently in the set. Start by trying to create the number 2.

Original entry on oeis.org

6, 10, 12, 20, 21, 22, 26, 30, 34, 35, 36, 38, 44, 46, 52, 58, 60, 63, 68, 70, 74, 76, 82, 84, 86, 90, 92, 93, 102, 104, 105, 106, 110, 114, 116, 118, 122, 126, 130, 132, 134, 136, 141, 142, 146, 148, 150, 154, 156, 161, 164, 166, 170, 171, 172, 178, 180, 182, 186, 194, 195, 198, 202, 203
Offset: 1

Views

Author

Scott R. Shannon, May 06 2022

Keywords

Comments

This sequence is a variation of A337486; instead of adding to the set all the prime factors of the numbers that cannot be created from the current primes in the set, only add those primes that are missing from the set, i.e., only add enough primes so that the number could then be created from the set. See A337486 for further details.

Examples

			a(1) = 6. As there are no primes initially in the set, the numbers 2, 3, 4, 5 cannot be created. These numbers add a 2, a 3, another 2 (only one extra 2 is added as 4 = 2*2 and one 2 is already in the set), and a 5. As there is now one 2 and one 3 the number 6 = 2*3 can be created. After 6 is created the set of primes now contains 2 and 5.
a(2) = 10. After 7, 8, 9, none of which can be created from the prime set, the prime set contains 2, 2, 2, 3, 3, 5, 7. Note 8 only added two extra 2's as one 2 was already in the set. As 2 and 5 are present 10 = 2*5 can be created, after which the set contains 2, 2, 3, 3, 7.
		

Crossrefs

Showing 1-4 of 4 results.