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-7 of 7 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

A324929 Numbers whose product of prime indices is even.

Original entry on oeis.org

3, 6, 7, 9, 12, 13, 14, 15, 18, 19, 21, 24, 26, 27, 28, 29, 30, 33, 35, 36, 37, 38, 39, 42, 43, 45, 48, 49, 51, 52, 53, 54, 56, 57, 58, 60, 61, 63, 65, 66, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 81, 84, 86, 87, 89, 90, 91, 93, 95, 96, 98, 99, 101, 102, 104
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, with product A003963(n).
Also Heinz numbers of integer partitions whose product of parts is even (counted by A047967), where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k).

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}
  13: {6}
  14: {1,4}
  15: {2,3}
  18: {1,2,2}
  19: {8}
  21: {2,4}
  24: {1,1,1,2}
  26: {1,6}
  27: {2,2,2}
  28: {1,1,4}
  29: {10}
  30: {1,2,3}
  33: {2,5}
  35: {3,4}
  36: {1,1,2,2}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],EvenQ[Times@@PrimePi/@If[#==1,{},FactorInteger[#]][[All,1]]]&]
  • PARI
    isok(n) = my(f=factor(n)[,1]); !(prod(k=1, #f, primepi(f[k])) % 2); \\ Michel Marcus, Mar 22 2019

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

A366322 Heinz numbers of integer partitions containing at least one odd part. Numbers divisible by at least one prime of odd index.

Original entry on oeis.org

2, 4, 5, 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 28, 30, 31, 32, 33, 34, 35, 36, 38, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 54, 55, 56, 58, 59, 60, 62, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 82, 83, 84, 85, 86
Offset: 1

Views

Author

Gus Wiseman, Oct 14 2023

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
    2: {1}
    4: {1,1}
    5: {3}
    6: {1,2}
    8: {1,1,1}
   10: {1,3}
   11: {5}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   16: {1,1,1,1}
   17: {7}
   18: {1,2,2}
   20: {1,1,3}
   22: {1,5}
   23: {9}
   24: {1,1,1,2}
		

Crossrefs

The complement is A066207, counted by A035363.
For all odd parts we have A066208, counted by A000009.
Partitions of this type are counted by A086543.
For even instead of odd we have A324929, counted by A047967.
A031368 lists primes of odd index.
A112798 list prime indices, sum A056239.
A257991 counts odd prime indices, distinct A324966.

Programs

  • Mathematica
    Select[Range[100],Or@@OddQ/@PrimePi/@First/@FactorInteger[#]&]

Formula

A257991(a(n)) > 0.

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

A366529 Heinz numbers of integer partitions of even numbers with at least one even part.

Original entry on oeis.org

3, 7, 9, 12, 13, 19, 21, 27, 28, 29, 30, 36, 37, 39, 43, 48, 49, 52, 53, 57, 61, 63, 66, 70, 71, 75, 76, 79, 81, 84, 87, 89, 90, 91, 101, 102, 107, 108, 111, 112, 113, 116, 117, 120, 129, 130, 131, 133, 138, 139, 144, 147, 148, 151, 154, 156, 159, 163, 165
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2023

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
   3: {2}
   7: {4}
   9: {2,2}
  12: {1,1,2}
  13: {6}
  19: {8}
  21: {2,4}
  27: {2,2,2}
  28: {1,1,4}
  29: {10}
  30: {1,2,3}
  36: {1,1,2,2}
  37: {12}
  39: {2,6}
  43: {14}
  48: {1,1,1,1,2}
		

Crossrefs

The complement is counted by A047967.
For all even parts we have A066207, counted by A035363, odd A066208.
Not requiring an even part gives A300061.
For odd instead of even we have A300063.
Not requiring even sum gives A324929.
Partitions of this type are counted by A366527.
A112798 list prime indices, sum A056239.
A257991 counts odd prime indices, distinct A324966.
A257992 counts even prime indices, distinct A324967.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],EvenQ[Total[prix[#]]]&&Or@@EvenQ/@prix[#]&]
Showing 1-7 of 7 results.