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

A109082 Depth of rooted tree having Matula-Goebel number n.

Original entry on oeis.org

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

Views

Author

Keith Briggs, Aug 17 2005

Keywords

Comments

Another term for depth is height.
Starting with n, a(n) is the number of times one must take the product of prime indices (A003963) to reach 1. - Gus Wiseman, Mar 27 2019

Examples

			a(7) = 2 because the rooted tree with Matula-Goebel number 7 is the 3-edge rooted tree Y of height 2.
		

Crossrefs

A left inverse of A007097.
Cf. A000081, A000720, A001222, A109129, A112798, A196050, A290822, A317713, A320325, A324927 (positions of 2), A324928 (positions of 3), A325032.
This statistic is counted by A034781, ordered A080936.
The ordered version is A358379.
For node-height instead of edge-height we have A358552.

Programs

  • Maple
    with(numtheory): a := proc(n) option remember; if n = 1 then 0 elif isprime(n) then 1+a(pi(n)) else max((map (p->a(p), factorset(n)))[]) end if end proc: seq(a(n), n = 1 .. 100); # Emeric Deutsch, Sep 16 2011
  • Mathematica
    a [n_] := a[n] = If[n == 1, 0, If[PrimeQ[n], 1+a[PrimePi[n]], Max[Map[a, FactorInteger[n][[All, 1]]]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, May 06 2014, after Emeric Deutsch *)
  • PARI
    a(n) = my(v=factor(n)[,1],d=0); while(#v,d++; v=fold(setunion, apply(p->factor(primepi(p))[,1]~, v))); d; \\ Kevin Ryde, Sep 21 2020
    
  • Python
    from functools import lru_cache
    from sympy import isprime, primepi, primefactors
    @lru_cache(maxsize=None)
    def A109082(n):
        if n == 1 : return 0
        if isprime(n): return 1+A109082(primepi(n))
        return max(A109082(p) for p in primefactors(n)) # Chai Wah Wu, Mar 19 2022

Formula

a(1)=0; if n is the t-th prime, then a(n) = 1 + a(t); if n is composite, n=t*s, then a(n) = max(a(t),a(s)). The Maple program is based on this.
a(A007097(n)) = n.
a(n) = A358552(n) - 1. - Gus Wiseman, Nov 27 2022

Extensions

Edited by Emeric Deutsch, Sep 16 2011

A324926 Numbers not divisible by any prime indices of their prime indices.

Original entry on oeis.org

1, 2, 4, 5, 8, 11, 16, 17, 22, 23, 25, 31, 32, 34, 41, 44, 47, 55, 59, 62, 64, 67, 73, 82, 83, 85, 88, 97, 103, 109, 115, 118, 121, 124, 125, 127, 128, 134, 137, 149, 157, 164, 166, 167, 176, 179, 187, 191, 194, 197, 205, 211, 218, 227, 233, 235, 236, 241, 242
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. For example, the prime indices of 55 are {3,5} with prime indices {{2},{3}}. Since 55 is not divisible by 2 or 3, it belongs to the sequence.

Examples

			The sequence of multisets of multisets whose MM-numbers (see A302242) belong to the sequence begins:
   1: {}
   2: {{}}
   4: {{},{}}
   5: {{2}}
   8: {{},{},{}}
  11: {{3}}
  16: {{},{},{},{}}
  17: {{4}}
  22: {{},{3}}
  23: {{2,2}}
  25: {{2},{2}}
  31: {{5}}
  32: {{},{},{},{},{}}
  34: {{},{4}}
  41: {{6}}
  44: {{},{},{3}}
  47: {{2,3}}
  55: {{2},{3}}
  59: {{7}}
  62: {{},{5}}
  64: {{},{},{},{},{},{}}
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And@@Table[!Divisible[#,i],{i,Union@@primeMS/@primeMS[#]}]&]

A102378 a(n) = a(n-1) + a([n/2]) + 1, a(1) = 1.

Original entry on oeis.org

1, 3, 5, 9, 13, 19, 25, 35, 45, 59, 73, 93, 113, 139, 165, 201, 237, 283, 329, 389, 449, 523, 597, 691, 785, 899, 1013, 1153, 1293, 1459, 1625, 1827, 2029, 2267, 2505, 2789, 3073, 3403, 3733, 4123, 4513, 4963, 5413, 5937, 6461, 7059, 7657, 8349
Offset: 1

Views

Author

Mitch Harris, Jan 05 2005

Keywords

Comments

From Gus Wiseman, Mar 23 2019: (Start)
The offset could safely be changed to zero by setting the boundary condition to a(0) = 0.
Also the number of integer partitions of 2n into powers of 2 with at least one part > 1. The Heinz numbers of these partitions are given by A324927. For example, the a(1) = 1 through a(5) = 13 integer partitions are:
(2) (4) (42) (8) (82)
(22) (222) (44) (442)
(211) (411) (422) (811)
(2211) (2222) (4222)
(21111) (4211) (4411)
(22211) (22222)
(41111) (42211)
(221111) (222211)
(2111111) (421111)
(2221111)
(4111111)
(22111111)
(211111111)
(End)

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And[Max@@#>1,And@@IntegerQ/@Log[2,#]]&]],{n,0,30,2}] (* Gus Wiseman, Mar 23 2019 *)
  • Python
    from itertools import islice
    from collections import deque
    def A102378_gen(): # generator of terms
        aqueue, f, b, a = deque([2]), True, 1, 2
        yield from (1, 3)
        while True:
            a += b
            yield 2*a - 1
            aqueue.append(a)
            if f: b = aqueue.popleft()
            f = not f
    A102378_list = list(islice(A102378_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

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 gf of A033485
a(n) = A000123(n) - 1. - Gus Wiseman, Mar 23 2019
G.f. A(x) satisfies: A(x) = (x + (1 - x^2) * A(x^2)) / (1 - x)^2. - Ilya Gutkovskiy, Aug 11 2021

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]]]]]&]

A324930 Total weight of the multiset of multisets of multisets with MMM number n. Totally additive with a(prime(n)) = A302242(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 2, 0, 2, 1, 0, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 1, 2, 2, 0, 0, 2, 2, 1, 0, 0, 2, 0, 0, 1, 1, 1, 2, 1, 0, 0, 2, 1, 3, 2, 2, 1, 1, 0, 3, 1, 2, 0, 1, 1, 1, 1, 0, 2, 2, 0, 3, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

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. The finite multiset of finite multisets of finite multisets of positive integers with MMM number n is obtained by factoring n into prime numbers, then factoring each of their prime indices into prime numbers, then factoring each of their prime indices into prime numbers, and finally taking their prime indices.

Examples

			The sequence of all finite multisets of finite multisets of finite multisets of positive integers begins (o is the empty multiset):
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((1)))
   6: (o(o))
   7: ((oo))
   8: (ooo)
   9: ((o)(o))
  10: (o((1)))
  11: (((2)))
  12: (oo(o))
  13: ((o(1)))
  14: (o(oo))
  15: ((o)((1)))
  16: (oooo)
  17: (((11)))
  18: (o(o)(o))
  19: ((ooo))
  20: (oo((1)))
		

Crossrefs

Programs

  • Mathematica
    fi[n_]:=If[n==1,{},FactorInteger[n]];
    Table[Total[Cases[fi[n],{p_,k_}:>k*Total[Cases[fi[PrimePi[p]],{q_,j_}:>j*PrimeOmega[PrimePi[q]]]]]],{n,60}]
Showing 1-5 of 5 results.