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.

Previous Showing 11-20 of 28 results. Next

A260850 Lexicographically earliest sequence such that for any n>1, n=u*v, where u/v = a(n)/a(n-1) in reduced form.

Original entry on oeis.org

1, 2, 6, 24, 120, 20, 140, 1120, 10080, 1008, 11088, 924, 12012, 858, 1430, 22880, 388960, 1750320, 33256080, 1662804, 3879876, 176358, 4056234, 10816624, 270415600, 10400600, 280816200, 10029150, 290845350, 9694845, 300540195, 9617286240, 35263382880
Offset: 1

Views

Author

Paul Tek, Aug 01 2015

Keywords

Examples

			From _Michael De Vlieger_, Apr 12 2024: (Start)
Table showing exponents m of prime powers p^m | a(n), n = 1..20, with "." representing p < gpf(n) does not divide a(n):
                       1111
    n        a(n)  23571379
   ------------------------
    1          1   .
    2          2   1
    3          6   11
    4         24   31
    5        120   311
    6         20   2.1
    7        140   2.11
    8       1120   5.11
    9      10080   5211
   10       1008   42.1
   11      11088   42.11
   12        924   21.11
   13      12012   21.111
   14        858   11..11
   15       1430   1.1.11
   16      22880   5.1.11
   17     388960   5.1.111
   18    1750320   421.111
   19   33256080   421.1111
   20    1662804   22..1111 (End)
		

Crossrefs

Cf. A008336, A370974 (sorted version).

Programs

  • Mathematica
    nn = 35; p[_] := 0; r = 0;
    Do[(Map[If[p[#1] < #2,
          p[#1] += #2,
          p[#1] -= #2] & @@ # &, #];
          If[r < #, r = #] &[#[[-1, 1]] ] ) &@
        Map[{PrimePi[#1], #2} & @@ # &, FactorInteger[n]];
      a[n] = Times @@ Array[Prime[#]^p[#] &, r], {n, nn}];
    Array[a, nn] (* Michael De Vlieger, Apr 12 2024 *)
  • PARI
    \\ See Links section.

Formula

a(p) = p*a(p-1) for any prime p.
a(n) = A008336(n+1) for n = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 21, 22, 23; are there other indices with this property?

A065422 If n | a(n) then a(n+1) = a(n)/(highest power of n that divides a(n)), otherwise a(n+1) = n*a(n); a(0) = 1.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 20, 140, 1120, 10080, 1008, 11088, 77, 1001, 14014, 210210, 3363360, 57177120, 1029188160, 19554575040, 977728752, 2217072, 100776, 2317848, 96577, 2414425, 62775050, 1694926350, 47457937800, 1376280196200
Offset: 0

Views

Author

Naohiro Nomoto, Nov 23 2001

Keywords

Crossrefs

See A008336 for another version. Cf. A005132.

Programs

  • Haskell
    a065422 n = a065422_list !! n
    a065422_list = 1 : 1 : f 2 1 where
       f n x = x' : f (n+1) x' where
           x' | x `mod` n == 0 = until ((> 0) . (`mod` n)) (`div` n) x
              | otherwise      = x * n
    -- Reinhard Zumkeller, Oct 10 2011
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[Divisible[a,n],a/n^IntegerExponent[a,n],a*n]}; Join[ {1,1},Transpose[NestList[nxt,{3,2},30]][[2]]] (* Harvey P. Dale, Jan 08 2013 *)

Extensions

Definition and offset corrected by Reinhard Zumkeller, Oct 10 2011
Typo in Crossrefs fixed by Paul Tek, Aug 01 2015

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

Views

Author

Michael De Vlieger, Apr 15 2024

Keywords

Comments

The only powers of 2 in the sequence are likely 1 and 2.

Examples

			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
		

Crossrefs

Programs

  • Mathematica
    Table[Total[2^(-1 + Select[Range@ PrimePi[n], OddQ@ Quotient[n, Prime[#]] &])], {n, 50}]
  • PARI
    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

Views

Author

Michael De Vlieger, Apr 15 2024

Keywords

Comments

The only primes in the sequence are 2 and 3.
We can approach the sequence in a manner akin to A260850, a variant of A008336. Set k = 1. Then for all prime factors p | n, if p | k, divide k by p, otherwise multiply k by p. Then we set a(n) = k. This accounts for the "toggling on or off" of prime factors as n increases.
For n >= 1, A055773(n) | a(n), where A055773(n) = A034386(n) / A034386(floor(n/2)).

Examples

			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
		

Crossrefs

Programs

  • Mathematica
    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}]
  • PARI
    a(n) = vecprod(select(x->((n\x) % 2), primes([1, n]))); \\ Michel Marcus, Apr 16 2024
    
  • SageMath
    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

Formula

a(n) = Product_{k = 1..floor(pi(n)/2)+1} Product_{j = 1+floor(n/(2*k))..floor(n/(2*k-1))} prime(j), where pi(x) = A000720(n).

A326889 a(1) = 1; thereafter a(n) = a(n-1) / phi(n) if phi(n) divides a(n-1), otherwise a(n) = a(n-1) * phi(n), where phi is the Euler phi-function A000010.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 12, 3, 18, 72, 720, 180, 15, 90, 720, 90, 1440, 240, 4320, 540, 45, 450, 9900, 79200, 3960, 330, 5940, 495, 13860, 110880, 3696, 231, 4620, 73920, 3080, 36960, 1330560, 73920, 3080, 49280, 1232, 14784, 352, 7040, 168960, 7680, 353280, 22080
Offset: 1

Views

Author

Rémy Sigrist, Sep 13 2019

Keywords

Comments

This sequence has similarities with A008336 and with A008338.

Examples

			The first terms, alongside phi(n), are:
  n   a(n)  phi(n)
  --  ----  ------
   1     1       1
   2     1       1
   3     2       2
   4     1       2
   5     4       4
   6     2       2
   7    12       6
   8     3       4
   9    18       6
  10    72       4
		

Crossrefs

See A327442 for an additive variant.

Programs

  • PARI
    for (n=1, 48, print1 (v=if (n==1, 1, v%e=eulerphi(n), v*e, v/e) ", "))

A330647 Lexicographically earliest sequence of distinct positive terms with an associate sequence t such that a(1) = t(1) = 1 and for n > 1, either a(n) divides t(n-1) (and in that case set t(n) = t(n-1)/a(n)) or a(n) is coprime to t(n-1) (and in that case set t(n) = t(n-1)*a(n)).

Original entry on oeis.org

1, 2, 3, 5, 6, 4, 7, 9, 10, 11, 13, 14, 8, 12, 17, 19, 22, 16, 23, 24, 15, 26, 28, 20, 21, 18, 25, 29, 30, 31, 32, 34, 37, 38, 40, 35, 41, 43, 44, 33, 27, 36, 47, 52, 39, 46, 51, 42, 48, 49, 53, 56, 58, 59, 61, 64, 60, 45, 62, 63, 57, 67, 68, 71, 73, 74, 77
Offset: 1

Views

Author

Rémy Sigrist, Dec 22 2019

Keywords

Comments

All prime numbers appear in the sequence, in ascending order.
This sequence is likely a permutation of the natural numbers.

Examples

			The first terms, alongside the corresponding t(n), are:
  n   a(n)  t(n)
  --  ----  ----
   1     1     1
   2     2     2
   3     3     6
   4     5    30
   5     6     5
   6     4    20
   7     7   140
   8     9  1260
   9    10   126
  10    11  1386
		

Crossrefs

See A330648 for the corresponding sequence t.
Cf. A008336.

Programs

  • Mathematica
    Nest[Append[#1, Block[{k = 2, s}, While[Nand[FreeQ[#1[[All, 1]], k], MemberQ[{1, k}, Set[s, GCD[#3, k]]]], k++]; {k, If[s == 1, #3 k, #3/k]}]] & @@ {#, #[[-1, 1]], #[[-1, -1]]} &, {{1, 1}}, 66][[All, 1]] (* Michael De Vlieger, Dec 23 2019 *)
  • PARI
    See Links section.

A360298 Irregular triangle (an infinite binary tree) read by rows. The tree has root node 1 in row n = 1. For n > 1, each node with value m in row n-1 has a left child with value m / n if n divides m, and a right child with value m * n.

Original entry on oeis.org

1, 2, 6, 24, 120, 20, 720, 140, 5040, 1120, 630, 40320, 10080, 70, 5670, 4480, 362880, 1008, 100800, 7, 700, 567, 56700, 448, 44800, 36288, 3628800, 11088, 1108800, 77, 7700, 6237, 623700, 4928, 492800, 399168, 39916800, 924, 133056, 92400, 13305600, 924, 92400, 74844, 51975, 7484400, 59136, 5913600, 33264, 4790016, 3326400, 479001600
Offset: 1

Views

Author

Rémy Sigrist, Feb 02 2023

Keywords

Comments

This sequence is a variant of A360173; here we use divisions and multiplications, there subtractions and additions.
The n-th row has A360299(n) terms, starts with A008336(n+1) and ends with A000142(n).

Examples

			The tree begins:
  n     n-th row
  --    --------
   1    1___
            |
   2        2___
                |
   3            6___
                    |
   4               24___
                        |
   5      _____________120_____________
         |                             |
   6    20___                         720___
             |                              |
   7        140___                   _____5040_____
                  |                 |              |
   8            1120__           __630__       __40320__
                      |         |       |     |         |
   9                10080      70     5670  4480     362880
		

Crossrefs

Cf. A000142, A008336, A360173, A360299 (row lengths), A360300.

Programs

  • PARI
    row(n) = { my (r = [1]); for (h = 2, n, r=concat(apply(v -> if (v%h==0, [v/h, v*h], [v*h]), r))); return (r) }
    
  • Python
    from functools import cache
    @cache
    def row(n):
        if n == 1: return [1]
        out = []
        for r in row(n-1): out += ([r//n] if r%n == 0 else []) + [r*n]
        return out
    print([an for r in range(1, 13) for an in row(r)]) # Michael S. Branicky, Feb 02 2023

Formula

T(n, 1) = A008336(n+1).
T(n, A360299(n)) = A000142(n).
T(p, k) = p * T(p-1, k) for any prime number p.

A362332 For n > 1, if n appears in the sequence then a(n) = lastindex(n), where lastindex(n) is the index of the last appearance of n. Otherwise a(n+1) = a(n)/(n+1) if (n+1)|a(n), otherwise a(n)*(n+1), a(1) = 1 and a(2) = 1*2.

Original entry on oeis.org

1, 2, 6, 24, 120, 3, 21, 168, 1512, 15120, 166320, 13860, 180180, 12870, 858, 13728, 233376, 4200768, 79814592, 1596291840, 7, 154, 3542, 4, 100, 2600, 70200, 1965600, 57002400, 1900080, 58902480, 1884879360, 62201018880
Offset: 1

Views

Author

Kelvin Voskuijl, Apr 16 2023

Keywords

Examples

			a(2) = 2, as a(1) = 1 and 1 times 2 is 2.
a(6) = 3, as a(3) = 6 = n, thus a(6) = 3.
a(7) = 21, as a(6) = 3 and 3 times 7 is 21.
		

Crossrefs

Programs

A330648 a(1) = 1 and for any n > 1, if A330647(n) divides a(n-1) then a(n) = a(n-1) / A330647(n), otherwise a(n) = a(n-1) * A330647(n).

Original entry on oeis.org

1, 2, 6, 30, 5, 20, 140, 1260, 126, 1386, 18018, 1287, 10296, 858, 14586, 277134, 12597, 201552, 4635696, 193154, 2897310, 111435, 3120180, 156009, 7429, 133722, 3343050, 96948450, 3231615, 100180065, 3205762080, 94287120, 3488623440, 91805880, 2295147
Offset: 1

Views

Author

Rémy Sigrist, Dec 22 2019

Keywords

Comments

This sequence has similarities with A008336.

Examples

			The first terms, alongside the corresponding A330647(n), are:
  n   a(n)  A330647(n)
  --  ----  ----------
   1     1           1
   2     2           2
   3     6           3
   4    30           5
   5     5           6
   6    20           4
   7   140           7
   8  1260           9
   9   126          10
  10  1386          11
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#1, Block[{k = 2, s}, While[Nand[FreeQ[#1[[All, 1]], k], MemberQ[{1, k}, Set[s, GCD[#3, k]]]], k++]; {k, If[s == 1, #3 k, #3/k], If[Mod[#3, k] == 0, #3/k, #3 k]}]] & @@ {#, #[[-1, 1]], #[[-1, 2]], #[[-1, -1]]} &, {{1, 1, 1}}, 34][[All, -1]] (* Michael De Vlieger, Dec 23 2019 *)
  • PARI
    x=1; s=0; for (n=1, 35, for (v=1, oo, if (!bittest(s,v), if (gcd(x,v)==1, s+=2^v; x*=v; break, x%v==0, s+=2^v; x/=v; break))); print1 (x", "))

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
Previous Showing 11-20 of 28 results. Next