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

A325094 Write n as a sum of distinct powers of 2, then take the primes of those powers of 2 and multiply them together.

Original entry on oeis.org

1, 2, 3, 6, 7, 14, 21, 42, 19, 38, 57, 114, 133, 266, 399, 798, 53, 106, 159, 318, 371, 742, 1113, 2226, 1007, 2014, 3021, 6042, 7049, 14098, 21147, 42294, 131, 262, 393, 786, 917, 1834, 2751, 5502, 2489, 4978, 7467, 14934, 17423, 34846, 52269, 104538, 6943
Offset: 0

Views

Author

Gus Wiseman, Mar 27 2019

Keywords

Comments

The sorted sequence is A325093.
For example, 11 = 1 + 2 + 8, so a(11) = prime(1) * prime(2) * prime(8) = 114.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    3: {2}
    6: {1,2}
    7: {4}
   14: {1,4}
   21: {2,4}
   42: {1,2,4}
   19: {8}
   38: {1,8}
   57: {2,8}
  114: {1,2,8}
  133: {4,8}
  266: {1,4,8}
  399: {2,4,8}
  798: {1,2,4,8}
   53: {16}
  106: {1,16}
  159: {2,16}
  318: {1,2,16}
  371: {4,16}
		

Crossrefs

Programs

  • Maple
    P:= [seq(ithprime(2^i),i=0..10)]:
    f:= proc(n) local L,i;
      L:= convert(n,base,2);
      mul(P[i]^L[i],i=1..nops(L))
    end proc:
    map(f, [$0..100]); # Robert Israel, Mar 28 2019
  • Mathematica
    Table[Times@@MapIndexed[If[#1==0,1,Prime[2^(#2[[1]]-1)]]&,Reverse[IntegerDigits[n,2]]],{n,0,100}]

A324927 Matula-Goebel numbers of rooted trees of depth 2. Numbers that are not powers of 2 but whose prime indices are all powers of 2.

Original entry on oeis.org

3, 6, 7, 9, 12, 14, 18, 19, 21, 24, 27, 28, 36, 38, 42, 48, 49, 53, 54, 56, 57, 63, 72, 76, 81, 84, 96, 98, 106, 108, 112, 114, 126, 131, 133, 144, 147, 152, 159, 162, 168, 171, 189, 192, 196, 212, 216, 224, 228, 243, 252, 262, 266, 288, 294, 304, 311, 318
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

Numbers n such that A109082(n) = 2.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Also Heinz numbers of integer partitions into powers of 2 with at least one part > 1 (counted by A102378).

Examples

			The sequence of terms together with their prime indices begins:
   3: {2}
   6: {1,2}
   7: {4}
   9: {2,2}
  12: {1,1,2}
  14: {1,4}
  18: {1,2,2}
  19: {8}
  21: {2,4}
  24: {1,1,1,2}
  27: {2,2,2}
  28: {1,1,4}
  36: {1,1,2,2}
  38: {1,8}
  42: {1,2,4}
  48: {1,1,1,1,2}
  49: {4,4}
  53: {16}
  54: {1,2,2,2}
  56: {1,1,1,4}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],And[!IntegerQ[Log[2,#]],And@@Cases[FactorInteger[#],{p_,_}:>IntegerQ[Log[2,PrimePi[p]]]]]&]

A324928 Matula-Goebel numbers of rooted trees of depth 3.

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 23, 25, 26, 30, 34, 35, 37, 39, 40, 43, 45, 46, 50, 51, 52, 60, 61, 65, 67, 68, 69, 70, 73, 74, 75, 78, 80, 85, 86, 89, 90, 91, 92, 95, 100, 102, 103, 104, 105, 107, 111, 115, 117, 119, 120, 122, 125, 129, 130, 134, 135, 136, 138, 140
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

Numbers n such that A109082(n) = 3.

Examples

			The sequence of all rooted trees of depth 3 together with their Matula-Goebel numbers begins:
   5: (((o)))
  10: (o((o)))
  13: ((o(o)))
  15: ((o)((o)))
  17: (((oo)))
  20: (oo((o)))
  23: (((o)(o)))
  25: (((o))((o)))
  26: (o(o(o)))
  30: (o(o)((o)))
  34: (o((oo)))
  35: (((o))(oo))
  37: ((oo(o)))
  39: ((o)(o(o)))
  40: (ooo((o)))
  43: ((o(oo)))
  45: ((o)(o)((o)))
  46: (o((o)(o)))
  50: (o((o))((o)))
  51: ((o)((oo)))
  52: (oo(o(o)))
  60: (oo(o)((o)))
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],Length[NestWhileList[Times@@PrimePi/@FactorInteger[#][[All,1]]&,#,#>1&]]-1==3&]

A325093 Heinz numbers of integer partitions into distinct powers of 2.

Original entry on oeis.org

1, 2, 3, 6, 7, 14, 19, 21, 38, 42, 53, 57, 106, 114, 131, 133, 159, 262, 266, 311, 318, 371, 393, 399, 622, 719, 742, 786, 798, 917, 933, 1007, 1113, 1438, 1619, 1834, 1866, 2014, 2157, 2177, 2226, 2489, 2751, 3021, 3238, 3671, 4314, 4354, 4857, 4978, 5033
Offset: 1

Views

Author

Gus Wiseman, Mar 27 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k), so these are squarefree numbers whose prime indices are powers of 2. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    3: {2}
    6: {1,2}
    7: {4}
   14: {1,4}
   19: {8}
   21: {2,4}
   38: {1,8}
   42: {1,2,4}
   53: {16}
   57: {2,8}
  106: {1,16}
  114: {1,2,8}
  131: {32}
  133: {4,8}
  159: {2,16}
  262: {1,32}
  266: {1,4,8}
  311: {64}
		

Crossrefs

Programs

  • Maple
    P:= [seq(ithprime(2^i),i=0..20)]:f:= proc(S,N) option remember;
      if S = [] or S[1]>N then return {1} fi;
      procname(S[2..-1],N) union
        map(t -> S[1]*t, procname(S[2..-1], floor(N/S[1])))end proc:
    sort(convert(f(P, P[20]),list));  # Robert Israel, Mar 28 2019
  • Mathematica
    Select[Range[1000],SquareFreeQ[#]&&And@@IntegerQ/@Log[2,Cases[If[#==1,{},FactorInteger[#]],{p_,_}:>PrimePi[p]]]&]
  • PARI
    isp2(q) = (q == 1) || (q == 2) || (ispower(q,,&p) && (p==2));
    isok(n) = {if (issquarefree(n), my(f=factor(n)[,1]); for (k=1, #f, if (! isp2(primepi(f[k])), return (0));); return (1);); return (0);} \\ Michel Marcus, Mar 28 2019

A325091 Heinz numbers of integer partitions of powers of 2.

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 10, 12, 16, 19, 34, 39, 49, 52, 53, 55, 63, 66, 70, 75, 81, 84, 88, 90, 94, 100, 108, 112, 120, 129, 131, 144, 160, 172, 192, 205, 246, 254, 256, 259, 311, 328, 333, 339, 341, 361, 370, 377, 391, 434, 444, 452, 465, 545, 558, 592, 598, 609, 614
Offset: 1

Views

Author

Gus Wiseman, Mar 27 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k), so these are numbers whose sum of prime indices is a power of 2. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
1 is in the sequence because it has prime indices {} with sum 0 = 2^(-infinity).

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   2: {1}
   3: {2}
   4: {1,1}
   7: {4}
   9: {2,2}
  10: {1,3}
  12: {1,1,2}
  16: {1,1,1,1}
  19: {8}
  34: {1,7}
  39: {2,6}
  49: {4,4}
  52: {1,1,6}
  53: {16}
  55: {3,5}
  63: {2,2,4}
  66: {1,2,5}
  70: {1,3,4}
  75: {2,3,3}
  81: {2,2,2,2}
		

Crossrefs

Programs

  • Maple
    q:= n-> (t-> t=2^ilog2(t))(add(numtheory[pi](i[1])*i[2], i=ifactors(n)[2])):
    select(q, [$1..1000])[];  # Alois P. Heinz, Mar 28 2019
  • Mathematica
    Select[Range[100],#==1||IntegerQ[Log[2,Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]]]]&]

A325092 Heinz numbers of integer partitions of powers of 2 into powers of 2.

Original entry on oeis.org

1, 2, 3, 4, 7, 9, 12, 16, 19, 49, 53, 63, 81, 84, 108, 112, 131, 144, 192, 256, 311, 361, 719, 931, 1197, 1539, 1596, 1619, 2052, 2128, 2401, 2736, 2809, 3087, 3648, 3671, 3969, 4116, 4864, 5103, 5292, 5488, 6561, 6804, 7056, 8161, 8748, 9072, 9408, 11664, 12096
Offset: 1

Views

Author

Gus Wiseman, Mar 27 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k), so these are numbers whose prime indices are powers of 2 and whose sum of prime indices is also a power of 2. A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
1 is in the sequence because it has prime indices {} with sum 0 = 2^(-infinity).

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    7: {4}
    9: {2,2}
   12: {1,1,2}
   16: {1,1,1,1}
   19: {8}
   49: {4,4}
   53: {16}
   63: {2,2,4}
   81: {2,2,2,2}
   84: {1,1,2,4}
  108: {1,1,2,2,2}
  112: {1,1,1,1,4}
  131: {32}
  144: {1,1,1,1,2,2}
  192: {1,1,1,1,1,1,2}
  256: {1,1,1,1,1,1,1,1}
  311: {64}
		

Crossrefs

Programs

  • Maple
    q:= n-> andmap(t-> t=2^ilog2(t), (l-> [l[], add(i, i=l)])(
          map(i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]))):
    select(q, [$1..15000])[];  # Alois P. Heinz, Mar 28 2019
  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    pow2Q[n_]:=IntegerQ[Log[2,n]];
    Select[Range[1000],#==1||pow2Q[Total[primeMS[#]]]&&And@@pow2Q/@primeMS[#]&]

A102379 a(n) is the minimal number of nodes in a binary tree of height n.

Original entry on oeis.org

0, 1, 2, 4, 6, 9, 12, 17, 22, 29, 36, 46, 56, 69, 82, 100, 118, 141, 164, 194, 224, 261, 298, 345, 392, 449, 506, 576, 646, 729, 812, 913, 1014, 1133, 1252, 1394, 1536, 1701, 1866, 2061, 2256, 2481, 2706, 2968, 3230, 3529, 3828, 4174, 4520, 4913
Offset: 1

Views

Author

Mitch Harris, Jan 05 2005

Keywords

Comments

Conjecture: Let b(n) be the number of fixed points of the set of binary partitions of n under Glaisher's function that proves Euler's odd-distinct theorem. Then b(1) = 1 and for n > 1, b(2*n) = b(2*n+1) = 2*a(n). - George Beck, Jul 23 2022

References

  • de Bruijn, N. G., On Mahler's partition problem. Nederl. Akad. Wetensch., Proc. 51, (1948) 659-669 = Indagationes Math. 10, 210-220 (1948).
  • Gonnet, Gaston H.; Olivie, Henk J.; and Wood, Derick, Height-ratio-balanced trees. Comput. J. 26 (1983), no. 2, 106-108.
  • Mahler, Kurt On a special functional equation. J. London Math. Soc. 15, (1940). 115-123.
  • Nievergelt, J.; Reingold, E. M., Binary search trees of bounded balance, SIAM J. Comput. 2 (1973), 33-43.

Crossrefs

Essentially partial sums of A040039.

Programs

  • Python
    from functools import cache
    @cache
    def a(n: int) -> int:
        return a(n - 1) + a(n // 2) + 1 if n > 1 else 0
    print([a(n) for n in range(1, 51)])  # Peter Luschny, Jul 24 2022

Formula

a(n) = a(n-1) + a(floor(n/2)) + 1, a(1) = 0.
a(n) - a(n-1) = A018819(n+1).
G.f. A(x) satisfies (1-x)*A(x) = 2*(1 + x)*B(x^2), where B(x) is the g.f. of A033485.

A346912 a(0) = 1; a(n) = a(n-1) + a(floor(n/2)) + 1.

Original entry on oeis.org

1, 3, 7, 11, 19, 27, 39, 51, 71, 91, 119, 147, 187, 227, 279, 331, 403, 475, 567, 659, 779, 899, 1047, 1195, 1383, 1571, 1799, 2027, 2307, 2587, 2919, 3251, 3655, 4059, 4535, 5011, 5579, 6147, 6807, 7467, 8247, 9027, 9927, 10827, 11875, 12923, 14119, 15315
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 11 2021

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; procname(n-1) + procname(floor(n/2)) + 1 end proc;
    f(0):= 1:
    map(f, [$1..50]); # Robert Israel, May 04 2025
  • Mathematica
    a[0] = 1; a[n_] := a[n] = a[n - 1] + a[Floor[n/2]] + 1; Table[a[n], {n, 0, 47}]
    nmax = 47; CoefficientList[Series[(1/(1 - x)) (-1 + 2 Product[1/(1 - x^(2^k)), {k, 0, Floor[Log[2, nmax]]}]), {x, 0, nmax}], x]
  • Python
    from itertools import islice
    from collections import deque
    def A346912_gen(): # generator of terms
        aqueue, f, b, a = deque([2]), True, 1, 2
        yield from (1, 3, 7)
        while True:
            a += b
            yield 4*a - 1
            aqueue.append(a)
            if f: b = aqueue.popleft()
            f = not f
    A346912_list = list(islice(A346912_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

G.f.: (1/(1 - x)) * (-1 + 2 * Product_{k>=0} 1/(1 - x^(2^k))).
a(n) = n + 1 + Sum_{k=1..n} a(floor(k/2)).
a(n) = 2 * A000123(n) - 1.
a(n) = 4 * A033485(n) - 1 for n > 0. - Hugo Pfoertner, Aug 12 2021
From Michael Tulskikh, Aug 12 2021: (Start)
2*a(2n) = a(2n-1) + a(2n+1).
a(2n) = a(2n-2) + a(n-1) + a(n) + 2.
a(2n) = 2*(Sum_{i=0..n} a(i)) - a(n) + 2n. (End)

A351621 a(1) = 1; a(n) = 1 + a(n-1) + Sum_{k=2..n} a(floor(n/k)).

Original entry on oeis.org

1, 3, 6, 12, 19, 32, 46, 69, 96, 133, 171, 234, 298, 379, 471, 595, 720, 891, 1063, 1288, 1531, 1815, 2100, 2496, 2900, 3371, 3873, 4479, 5086, 5848, 6611, 7530, 8491, 9580, 10691, 12088, 13486, 15059, 16700, 18642, 20585, 22885, 25186, 27818, 30580, 33630, 36681, 40363, 44060, 48208
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 20 2022

Keywords

Comments

Partial sums of A345139.

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = 1 + a[n - 1] + Sum[a[Floor[n/k]], {k, 2, n}]; Table[a[n], {n, 1, 50}]

Formula

G.f. A(x) satisfies: A(x) = ( x + Sum_{k>=2} (1 - x^k) * A(x^k) ) / (1 - x)^2.

A179045 Triangle T(n,k), 1<=k<=n, read by rows, related to A033485.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 5, 2, 1, 1, 7, 3, 1, 1, 1, 10, 4, 2, 1, 1, 1, 13, 5, 3, 1, 1, 1, 1, 18, 7, 4, 2, 1, 1, 1, 1, 23, 9, 5, 3, 1, 1, 1, 1, 1, 30, 12, 6, 4, 2, 1, 1, 1, 1, 1, 37, 15, 7, 5, 3, 1, 1, 1, 1, 1, 1, 47, 19, 9, 6, 4, 2, 1, 1, 1, 1, 1, 1, 57, 23, 11, 7, 5, 3, 1, 1, 1, 1, 1, 1, 1, 70, 28, 14, 8, 6, 4
Offset: 1

Views

Author

Philippe Deléham, Jun 26 2010

Keywords

Comments

Column k=1 : A033485 ; column k=2 : A062188 ; row sums : A102378.

Examples

			Triangle begins : 1 ; 2,1 ; 3,1,1 ; 5,2,1,1 ; 7,3,1,1,1 ; ...
		

Crossrefs

Formula

T(n,k)=T(n-1,k)+T([n/2],k), T(n,n)=1, T(n,k)=0 if k>n.
Showing 1-10 of 10 results.