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

A283477 If 2n = 2^e1 + 2^e2 + ... + 2^ek [e1 .. ek distinct], then a(n) = A002110(e1) * A002110(e2) * ... * A002110(ek).

Original entry on oeis.org

1, 2, 6, 12, 30, 60, 180, 360, 210, 420, 1260, 2520, 6300, 12600, 37800, 75600, 2310, 4620, 13860, 27720, 69300, 138600, 415800, 831600, 485100, 970200, 2910600, 5821200, 14553000, 29106000, 87318000, 174636000, 30030, 60060, 180180, 360360, 900900, 1801800, 5405400, 10810800, 6306300, 12612600, 37837800, 75675600
Offset: 0

Views

Author

Antti Karttunen, Mar 16 2017

Keywords

Comments

a(n) = Product of distinct primorials larger than one, obtained as Product_{i} A002110(1+i), where i ranges over the zero-based positions of the 1-bits present in the binary representation of n.
This sequence can be represented as a binary tree. Each child to the left is obtained as A283980(k), and each child to the right is obtained as 2*A283980(k), when their parent contains k:
1
|
...................2....................
6 12
30......../ \........60 180......../ \......360
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
210 420 1260 2520 6300 12600 37800 75600
etc.

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]], {n, 0, 43}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A283477(n) = prod(i=0,exponent(n),if(bittest(n,i),vecprod(primes(1+i)),1)) \\ Edited by M. F. Hasler, Nov 11 2019
    
  • Python
    from sympy import prime, primerange, factorint
    from operator import mul
    from functools import reduce
    def P(n): return reduce(mul, [i for i in primerange(2, n + 1)])
    def a108951(n):
        f = factorint(n)
        return 1 if n==1 else reduce(mul, [P(i)**f[i] for i in f])
    def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1 # after Chai Wah Wu
    def a(n): return a108951(a019565(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 22 2017
    
  • Python
    from sympy import primorial
    from math import prod
    def A283477(n): return prod(primorial(i) for i, b in enumerate(bin(n)[:1:-1],1) if b =='1') # Chai Wah Wu, Dec 08 2022
  • Scheme
    (define (A283477 n) (A108951 (A019565 n)))
    ;; Recursive "binary tree" implementation, using memoization-macro definec:
    (definec (A283477 n) (cond ((zero? n) 1) ((even? n) (A283980 (A283477 (/ n 2)))) (else (* 2 (A283980 (A283477 (/ (- n 1) 2)))))))
    

Formula

a(0) = 1; a(2n) = A283980(a(n)), a(2n+1) = 2*A283980(a(n)).
Other identities. For all n >= 0 (or for n >= 1):
a(2n+1) = 2*a(2n).
a(n) = A108951(A019565(n)).
A097248(a(n)) = A283475(n).
A007814(a(n)) = A051903(a(n)) = A000120(n).
A001221(a(n)) = A070939(n).
A001222(a(n)) = A029931(n).
A048675(a(n)) = A005187(n).
A248663(a(n)) = A006068(n).
A090880(a(n)) = A283483(n).
A276075(a(n)) = A283984(n).
A276085(a(n)) = A283985(n).
A046660(a(n)) = A124757(n).
A056169(a(n)) = A065120(n). [seems to be]
A005361(a(n)) = A284001(n).
A072411(a(n)) = A284002(n).
A007913(a(n)) = A284003(n).
A000005(a(n)) = A284005(n).
A324286(a(n)) = A324287(n).
A276086(a(n)) = A324289(n).
A267263(a(n)) = A324341(n).
A276150(a(n)) = A324342(n). [subsequences in the latter are converging towards this sequence]
G.f.: Product_{k>=0} (1 + prime(k + 1)# * x^(2^k)), where prime()# = A002110. - Ilya Gutkovskiy, Aug 19 2019

Extensions

More formulas and the binary tree illustration added by Antti Karttunen, Mar 19 2017
Four more linking formulas added by Antti Karttunen, Feb 25 2019

A284005 a(0) = 1, and for n > 1, a(n) = (1 + A000120(n))*a(floor(n/2)); also a(n) = A000005(A283477(n)).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480, 600, 720, 64, 96, 144, 192, 216, 288, 384, 480, 324, 432, 576, 720, 768, 960, 1200, 1440, 486, 648, 864, 1080, 1152, 1440, 1800, 2160, 1536, 1920, 2400, 2880, 3000
Offset: 0

Views

Author

Antti Karttunen, Mar 18 2017

Keywords

Crossrefs

Similar recurrences: A124758, A243499, A329369, A341392.

Programs

  • Mathematica
    Table[DivisorSigma[0, #] &@ Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]], {n, 0, 71}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A284005(n) = numdiv(A283477(n)); \\ edited by Michel Marcus, May 01 2019, M. F. Hasler, Nov 10 2019
    
  • PARI
    a(n) = my(k=if(n,logint(n,2)),s=1); prod(i=0,k, s+=bittest(n,k-i)); \\ Kevin Ryde, Jan 20 2021
  • Scheme
    (define (A284005 n) (A000005 (A283477 n)))
    

Formula

a(n) = A000005(A283477(n)).
Conjecture: a(n) = 2*a(f(n)) + Sum_{k=0..floor(log_2(n))-1} a(f(n) + 2^k*(1 - T(n,k))) for n > 1 with a(0) = 1, a(1) = 2, f(n) = A053645(n), T(n,k) = floor(n/2^k) mod 2. - Mikhail Kurkov, Nov 10 2019
From Mikhail Kurkov, Aug 23 2021: (Start)
a(2n+1) = a(n) + a(2n) for n >= 0.
a(2n) = a(n) + a(2n - 2^A007814(n)) for n > 0 with a(0) = 1. (End)
Conjecture: a(n) = Sum_{k=0..n} (binomial(n, k) mod 2)*A329369(k). In other words, this sequence is modulo 2 binomial transform of A329369. - Mikhail Kurkov, Mar 10 2023
Conjecture: a(2^m*(2n+1)) = Sum_{k=0..m+1} binomial(m+1, k)*a(2^k*n) for m >= 0, n >= 0 with a(0) = 1. - Mikhail Kurkov, Apr 24 2023

Extensions

Made Mikhail Kurkov's Nov 10 2019 formula the new primary name of this sequence - Antti Karttunen, Dec 30 2020

A329382 Product of exponents of prime factors of A108951(n), where A108951 is fully multiplicative with a(prime(i)) = prime(i)# = Product_{i=1..i} A000040(i).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 4, 2, 1, 3, 1, 2, 4, 4, 1, 6, 1, 3, 4, 2, 1, 4, 8, 2, 9, 3, 1, 6, 1, 5, 4, 2, 8, 8, 1, 2, 4, 4, 1, 6, 1, 3, 9, 2, 1, 5, 16, 12, 4, 3, 1, 12, 8, 4, 4, 2, 1, 8, 1, 2, 9, 6, 8, 6, 1, 3, 4, 12, 1, 10, 1, 2, 18, 3, 16, 6, 1, 5, 16, 2, 1, 8, 8, 2, 4, 4, 1, 12, 16, 3, 4, 2, 8, 6, 1, 24, 9, 16, 1, 6, 1, 4, 18
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2019

Keywords

Comments

Also the product of parts of the conjugate of the integer partition with Heinz number n, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). For example, the partition (3,2) with Heinz number 15 has conjugate (2,2,1) with product a(15) = 4. - Gus Wiseman, Mar 27 2022

Crossrefs

This is the conjugate version of A003963 (product of prime indices).
The solutions to a(n) = A003963(n) are A325040, counted by A325039.
The Heinz number of the conjugate partition is given by A122111.
These are the row products of A321649 and of A321650.
A000700 counts self-conj partitions, ranked by A088902, complement A330644.
A008480 counts permutations of prime indices, conjugate A321648.
A056239 adds up prime indices, row sums of A112798 and of A296150.
A124010 gives prime signature, sorted A118914, sum A001222.
A238744 gives the conjugate of prime signature, rank A238745.

Programs

  • Mathematica
    Table[Times @@ FactorInteger[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]][[All, -1]], {n, 105}] (* Michael De Vlieger, Jan 21 2020 *)
  • PARI
    A005361(n) = factorback(factor(n)[, 2]); \\ from A005361
    A034386(n) = prod(i=1, primepi(n), prime(i));
    A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) };  \\ From A108951
    A329382(n) = A005361(A108951(n));
    
  • PARI
    A329382(n) = if(1==n,1,my(f=factor(n),e=0,m=1); forstep(i=#f~,1,-1, e += f[i,2]; m *= e^(primepi(f[i,1])-if(1==i,0,primepi(f[i-1,1])))); (m)); \\ Antti Karttunen, Jan 14 2020

Formula

a(n) = A005361(A108951(n)).
A329605(n) >= a(n) >= A329617(n) >= A329378(n).
a(A019565(n)) = A284001(n).
From Antti Karttunen, Jan 14 2020: (Start)
If n = p(k1)^e(k1) * p(k2)^e(k2) * p(k3)^e(k3) * ... * p(kx)^e(kx), with p(n) = A000040(n) and k1 > k2 > k3 > ... > kx, then a(n) = e(k1)^(k1-k2) * (e(k1)+e(k2))^(k2-k3) * (e(k1)+e(k2)+e(k3))^(k3-k4) * ... * (e(k1)+e(k2)+...+e(kx))^kx.
a(n) = A000005(A331188(n)) = A329605(A052126(n)).
(End)
a(n) = A003963(A122111(n)). - Gus Wiseman, Mar 27 2022

A095684 Triangle read by rows. There are 2^(m-1) rows of length m, for m = 1, 2, 3, ... The rows are in lexicographic order. The rows have the property that the first entry is 1, the second distinct entry (reading from left to right) is 2, the third distinct entry is 3, etc.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 1, 2, 3, 3, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 1, 1, 2, 2, 2, 1, 1, 2, 2, 3, 1, 1, 2, 3, 3, 1, 1, 2, 3, 4, 1, 2, 2, 2, 2, 1, 2, 2, 2, 3, 1, 2, 2, 3, 3
Offset: 1

Views

Author

N. J. A. Sloane, Jun 25 2004

Keywords

Comments

Row k is the unique multiset that covers an initial interval of positive integers and has multiplicities equal to the parts of the k-th composition in standard order (graded reverse-lexicographic, A066099). This composition is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. For example, the 13th composition is (1,2,1), so row 13 is {1,2,2,3}. - Gus Wiseman, Apr 26 2020

Examples

			1, 11, 12, 111, 112, 122, 123, 1111, 1112, 1122, 1123, 1222, 1223, 1233, ...
The 8 strings of length 4 are 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234.
From _Gus Wiseman_, Apr 26 2020: (Start)
The triangle read by columns begins:
  1:{1}  2:{1,1}  4:{1,1,1}   8:{1,1,1,1}  16:{1,1,1,1,1}
         3:{1,2}  5:{1,1,2}   9:{1,1,1,2}  17:{1,1,1,1,2}
                  6:{1,2,2}  10:{1,1,2,2}  18:{1,1,1,2,2}
                  7:{1,2,3}  11:{1,1,2,3}  19:{1,1,1,2,3}
                             12:{1,2,2,2}  20:{1,1,2,2,2}
                             13:{1,2,2,3}  21:{1,1,2,2,3}
                             14:{1,2,3,3}  22:{1,1,2,3,3}
                             15:{1,2,3,4}  23:{1,1,2,3,4}
                                           24:{1,2,2,2,2}
                                           25:{1,2,2,2,3}
                                           26:{1,2,2,3,3}
                                           27:{1,2,2,3,4}
                                           28:{1,2,3,3,3}
                                           29:{1,2,3,3,4}
                                           30:{1,2,3,4,4}
                                           31:{1,2,3,4,5}
(End)
		

Crossrefs

See A096299 for another version.
The number of distinct parts in row n is A000120(n), also the maximum part.
Row sums are A029931.
Heinz numbers of rows are A057335.
Row lengths are A070939.
Row products are A284001.
The version for prime indices is A305936.
There are A333942(n) multiset partitions of row n.
Multisets of compositions are counted by A034691.
Combinatory separations of normal multisets are A269134.
All of the following pertain to compositions in standard order (A066099):
- Necklaces are A065609.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon words are A275692.
- Dealings are counted by A333939.
- Distinct parts are counted by A334028.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}];
    Table[ptnToNorm[stc[n]],{n,15}] (* Gus Wiseman, Apr 26 2020 *)

A349194 a(n) is the product of the sum of the first i digits of n, as i goes from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 49, 56, 63, 70, 77
Offset: 1

Views

Author

Malo David, Nov 10 2021

Keywords

Comments

The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Nov 23 2021

Examples

			For n=256, a(256) = 2*(2+5)*(2+5+6) = 182.
		

Crossrefs

Cf. A055642, A284001 (binary analog), A349190 (fixed points).
Cf. A007953 (sum of digits), A059995 (floor(n/10)).
Cf. A349278 (similar, with the last digits).

Programs

  • Magma
    f:=func; [f(n):n in [1..100]]; // Marius A. Burtea, Nov 23 2021
  • Mathematica
    Table[Product[Sum[Part[IntegerDigits[n],j],{j,i}],{i,Length[IntegerDigits[n]]}],{n,74}] (* Stefano Spezia, Nov 10 2021 *)
  • PARI
    a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ Michel Marcus, Nov 10 2021
    
  • PARI
    first(n)=if(n<9,return([1..n])); my(v=vector(n)); for(i=1,9,v[i]=i); for(i=10,n, v[i]=sumdigits(i)*v[i\10]); v \\ Charles R Greathouse IV, Dec 04 2021
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return prod(accumulate(map(int, str(n))))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2021
    

Formula

For n>10: a(n) = a(A059995(n))*A007953(n) where A059995(n) = floor(n/10).
In particular, for n<100: a(n) = floor(n/10)*A007953(n)
From Bernard Schott, Nov 23 2021: (Start)
a(n) = 1 iff n = 10^k, k >= 0 (A011557).
a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
a(n) = 5 iff n = 10^k + 4, k >= 0.
a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
From Marius A. Burtea, Nov 23 2021: (Start)
a(A002275(n)) = n! = A000142(n), n >= 1.
a(A090843(n - 1)) = (2*n - 1)!! = A001147(n), n >= 1.
a(A097166(n)) = (3*n - 2)!!! = A007559(n).
a(A093136(n)) = 2^n = A000079(n).
a(A093138(n)) = 3^n = A000244(n). (End)

A284002 a(n) = A072411(A283477(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 6, 1, 2, 2, 6, 2, 6, 6, 12, 1, 2, 2, 6, 2, 6, 6, 12, 2, 6, 6, 12, 6, 12, 12, 60, 1, 2, 2, 6, 2, 6, 6, 12, 2, 6, 6, 12, 6, 12, 12, 60, 2, 6, 6, 12, 6, 12, 12, 60, 6, 12, 12, 60, 12, 60, 60, 60, 1, 2, 2, 6, 2, 6, 6, 12, 2, 6, 6, 12, 6, 12, 12, 60, 2, 6, 6, 12, 6, 12, 12, 60, 6, 12, 12, 60, 12, 60, 60, 60, 2, 6, 6, 12, 6, 12, 12, 60, 6, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Mar 18 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[LCM @@ FactorInteger[#][[All, -1]] &[Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@p, e}] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]]], {n, 0, 90}] (* Michael De Vlieger, Mar 18 2017 *)
  • Scheme
    (define (A284002 n) (A072411 (A283477 n)))

Formula

a(n) = A072411(A283477(n)).

A333942 Number of multiset partitions of a multiset whose multiplicities are the parts of the n-th composition in standard order.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 5, 5, 7, 9, 11, 7, 11, 11, 15, 7, 12, 16, 21, 16, 26, 26, 36, 12, 21, 26, 36, 21, 36, 36, 52, 11, 19, 29, 38, 31, 52, 52, 74, 29, 52, 66, 92, 52, 92, 92, 135, 19, 38, 52, 74, 52, 92, 92, 135, 38, 74, 92, 135, 74, 135, 135, 203, 15, 30, 47
Offset: 0

Views

Author

Gus Wiseman, Apr 16 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The a(1) = 1 through a(11) = 11 multiset partitions:
  {1}  {11}    {12}    {111}      {112}      {122}      {123}
       {1}{1}  {1}{2}  {1}{11}    {1}{12}    {1}{22}    {1}{23}
                       {1}{1}{1}  {2}{11}    {2}{12}    {2}{13}
                                  {1}{1}{2}  {1}{2}{2}  {3}{12}
                                                        {1}{2}{3}
  {1111}        {1112}        {1122}        {1123}
  {1}{111}      {1}{112}      {1}{122}      {1}{123}
  {11}{11}      {11}{12}      {11}{22}      {11}{23}
  {1}{1}{11}    {2}{111}      {12}{12}      {12}{13}
  {1}{1}{1}{1}  {1}{1}{12}    {2}{112}      {2}{113}
                {1}{2}{11}    {1}{1}{22}    {3}{112}
                {1}{1}{1}{2}  {1}{2}{12}    {1}{1}{23}
                              {2}{2}{11}    {1}{2}{13}
                              {1}{1}{2}{2}  {1}{3}{12}
                                            {2}{3}{11}
                                            {1}{1}{2}{3}
		

Crossrefs

The described multiset has A000120 distinct parts.
The sum of the described multiset is A029931.
Multisets of compositions are A034691.
The described multiset is a row of A095684.
Combinatory separations of normal multisets are A269134.
The product of the described multiset is A284001.
The version for prime indices is A318284.
The version counting combinatory separations is A334030.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Length of Lyndon factorization is A329312.
- Dealings are counted by A333939.
- Distinct parts are counted by A334028.
- Length of co-Lyndon factorization is A334029.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[facs[Times@@Prime/@ptnToNorm[stc[n]]]],{n,0,30}]

Formula

a(n) = A001055(A057335(n)).

A333978 Numbers of the form b_1 * b_2 * ... * b_t, where b_1 = 1 and b_(i + 1) - b_i = 0 or 1.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 32, 36, 48, 54, 64, 72, 96, 108, 120, 128, 144, 162, 192, 216, 240, 256, 288, 324, 360, 384, 432, 480, 486, 512, 576, 600, 648, 720, 768, 864, 960, 972, 1024, 1080, 1152, 1200, 1296, 1440, 1458, 1536, 1728, 1800, 1920, 1944, 2048
Offset: 1

Views

Author

Peter Kagey, Sep 20 2020

Keywords

Comments

This sequence gives the distinct values in A284001, sorted.
If m and k are in this sequence, then so is their product m*k.
If a prime p divides a(n), then so does p!.
A001013 is a subsequence.
Define a set S of polynomials by: (i) 1 is in S; (ii) if P is in S, then x*P and dP/dx are in S; (iii) if the repeated application of (i) and (ii) fails to prove that P is in S then P is not in S. This sequence enumerates the elements of S of degree 0. - Luc Rousseau, Aug 20 2022
Numbers k divisible by A102068(k) (or in other words, numbers k divisible by h(k)! where h(k) is the largest prime factor of k). - David A. Corneth, Aug 20 2022

Examples

			The first 11 terms can be written as
   1 = 1
   2 = 1 * 2
   4 = 1 * 2 * 2
   6 = 1 * 2 * 3
   8 = 1 * 2 * 2 * 2
  12 = 1 * 2 * 2 * 3
  16 = 1 * 2 * 2 * 2 * 2
  18 = 1 * 2 * 3 * 3
  24 = 1 * 2 * 3 * 4 or 1 * 2 * 2 * 2 * 3
  32 = 1 * 2 * 2 * 2 * 2 * 2
  36 = 1 * 2 * 2 * 3 * 3
		

Crossrefs

Programs

  • PARI
    is(n) = if(n==1, return(1)); my(f = factor(n), p = f[#f~, 1]); n%p! == 0 \\ David A. Corneth, Sep 05 2022
  • Python
    import heapq
    from math import factorial
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        oldv, h, primes, nextp, nextfact = 0, [(1, 1)], [], 0, 0
        while True:
            v, maxp = heapq.heappop(h)
            if v != oldv:
                yield v; oldv = v
                while nextfact < v:
                    nextp = nextprime(nextp); nextfact = factorial(nextp)
                    primes.append(nextp); heapq.heappush(h, (nextfact, nextp))
                for p in primes:
                    if p <= maxp: heapq.heappush(h, (v*p, max(maxp, p)))
                    else: break
    print(list(islice(agen(), 60))) # Michael S. Branicky, Aug 20 2022
    

A334636 Number of different values of (x_n, x_1*x_2*...*x_n) where x_1=1 and x_i-x_{i-1} is 0 or 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 59, 110, 202, 366, 653, 1143, 1961, 3303, 5480, 8992, 14647, 23742, 38334, 61648, 98700, 157265, 249397, 393814, 619611, 971988, 1521015, 2374946, 3700290, 5751806, 8916890, 13780598, 21220014, 32540179, 49668909, 75435401
Offset: 1

Views

Author

Jack Zhang, Sep 10 2020

Keywords

Crossrefs

Programs

  • Python
    k=[{(1, 1)}]
    for i in range(20):
        k.append(set([(i[0]*i[1], i[1]) for i in k[-1]])|set([(i[0]*(i[1]+1), i[1]+1) for i in k[-1]]))
    [len(i) for i in k]

Extensions

a(31)-a(36) from Bert Dobbelaere, Oct 19 2020
Showing 1-9 of 9 results.