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.

User: Bobby Jacobs

Bobby Jacobs's wiki page.

Bobby Jacobs has authored 75 sequences. Here are the ten most recent ones:

A332765 Consider all permutations p_i of the first n primes; a(n) is the minimum over p_i of the maximal product of two adjacent primes in the permutation.

Original entry on oeis.org

6, 10, 15, 22, 35, 55, 77, 91, 143, 187, 221, 253, 323, 391, 493, 551, 667, 713, 899, 1073, 1189, 1271, 1517, 1591, 1763, 1961, 2183, 2419, 2537, 2773, 3127, 3233, 3599, 3953, 4189, 4331, 4757, 4897, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633, 8989, 9797, 9991, 10403, 10807
Offset: 2

Author

Bobby Jacobs, Apr 23 2020

Keywords

Comments

The optimal permutation of n primes is {p_n, p_1, p_n-1, p_2, …, p_ceiling(n/2)}. - Ivan N. Ianakiev, Apr 28 2020
Also the greatest squarefree semiprime whose prime indices sum to n + 1. A squarefree semiprime (A006881) is a product of any two distinct prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798. - Gus Wiseman, Dec 06 2020

Examples

			Here are the ways (up to reversal) to order the first four primes:
  2, 3, 5, 7: Products: 6, 15, 35;  Largest product: 35
  2, 3, 7, 5: Products: 6, 21, 35;  Largest product: 35
  2, 5, 3, 7: Products: 10, 15, 21; Largest product: 21
  2, 5, 7, 3: Products: 10, 35, 21; Largest product: 35
  2, 7, 3, 5: Products: 14, 21, 15; Largest product: 21
  2, 7, 5, 3: Products: 14, 35, 15; Largest product: 35
  3, 2, 5, 7: Products: 6, 10, 35;  Largest product: 35
  3, 2, 7, 5: Products: 6, 14, 35;  Largest product: 35
  3, 5, 2, 7: Products: 15, 10, 14; Largest product: 15
  3, 7, 2, 5: Products: 21, 14, 10; Largest product: 21
  5, 2, 3, 7: Products: 10, 6, 21;  Largest product: 21
  5, 3, 2, 7: Products: 15, 6, 14;  Largest product: 15
The minimum largest product is 15, so a(4) = 15.
From _Gus Wiseman_, Dec 06 2020: (Start)
The sequence of terms together with their prime indices begins:
      6: {1,2}     551: {8,10}    3127: {16,17}
     10: {1,3}     667: {9,10}    3233: {16,18}
     15: {2,3}     713: {9,11}    3599: {17,18}
     22: {1,5}     899: {10,11}   3953: {17,19}
     35: {3,4}    1073: {10,12}   4189: {17,20}
     55: {3,5}    1189: {10,13}   4331: {18,20}
     77: {4,5}    1271: {11,13}   4757: {19,20}
     91: {4,6}    1517: {12,13}   4897: {17,23}
    143: {5,6}    1591: {12,14}   5293: {19,22}
    187: {5,7}    1763: {13,14}   5723: {17,25}
    221: {6,7}    1961: {12,16}   5963: {19,24}
    253: {5,9}    2183: {12,17}   6499: {19,25}
    323: {7,8}    2419: {13,17}   6887: {20,25}
    391: {7,9}    2537: {14,17}   7171: {20,26}
    493: {7,10}   2773: {15,17}   7663: {22,25}
(End)
		

Crossrefs

A338904 and A338905 have this sequence as row maxima.
A339115 is the not necessarily squarefree version.
A001358 lists semiprimes.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes.
A025129 gives the sum of squarefree semiprimes of weight n.
A056239 (weight) gives the sum of prime indices of n.
A320656 counts factorizations into squarefree semiprimes.
A338898/A338912/A338913 give the prime indices of semiprimes, with product/sum/difference A087794/A176504/A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with product/sum/difference A339361/A339362/A338900.
A338907/A338908 list squarefree semiprimes of odd/even weight.
A339114 is the least (squarefree) semiprime of weight n.
A339116 groups squarefree semiprimes by greater prime factor.

Programs

  • Mathematica
    primes[n_]:=Reverse[Prime/@Range[n]]; partition[n_]:=Partition[primes[n],UpTo[Ceiling[n/2]]];
    riffle[n_]:=Riffle[partition[n][[1]],Reverse[partition[n][[2]]]];
    a[n_]:=Max[Table[riffle[n][[i]]*riffle[n][[i+1]],{i,1,n-1}]];a/@Range[2,53]
    (* Ivan N. Ianakiev, Apr 28 2020 *)

Formula

It appears that a(n) = A332877(n - 1) for n > 5.

Extensions

a(12)-a(13) from Jinyuan Wang, Apr 24 2020
More terms from Ivan N. Ianakiev, Apr 28 2020

A333747 Numbers that are either the product of two consecutive primes or two primes with a prime in between.

Original entry on oeis.org

6, 10, 15, 21, 35, 55, 77, 91, 143, 187, 221, 247, 323, 391, 437, 551, 667, 713, 899, 1073, 1147, 1271, 1517, 1591, 1763, 1927, 2021, 2279, 2491, 2773, 3127, 3233, 3599, 3953, 4087, 4331, 4757, 4891, 5183, 5609, 5767, 6059, 6557, 7031, 7387, 8051, 8633, 8989, 9797, 9991
Offset: 1

Author

Bobby Jacobs, Apr 03 2020

Keywords

Comments

In other words, these are numbers that are the product of two distinct primes whose prime indices differ by at most two.

Crossrefs

Programs

  • Maple
    R:= NULL;
    p:= 2; q:= 3;
    for n from 1 to 100 by 2 do
      r:= nextprime(q);
      R:= R, p*q, p*r;
      p:= q; q:= r;
    od:
    R; # Robert Israel, Apr 22 2020
  • Mathematica
    a[n_] := Prime[Ceiling[n/2]] * Prime[Ceiling[(n + 3)/2]]; Array[a, 50] (* Amiram Eldar, Apr 04 2020 *)

Formula

Union of A006094 and A090076.
a(n) = prime(ceiling(n/2))*prime(ceiling((n+3)/2)).
a(2*n-1) = prime(n)*prime(n+1).
a(2*n) = prime(n)*prime(n+2).

A332877 Arrange the first n primes in a circle in any order. a(n) is the minimum value of the largest product of two consecutive primes out of all possible orders.

Original entry on oeis.org

6, 15, 21, 35, 55, 77, 91, 143, 187, 221, 253, 323, 391, 493, 551, 667, 713, 899, 1073, 1189, 1271, 1517, 1591, 1763, 1961, 2183, 2419, 2537, 2773, 3127, 3233, 3599, 3953, 4189, 4331, 4757, 4897, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633, 8989, 9797, 9991, 10403, 10807, 11303
Offset: 2

Author

Bobby Jacobs, Apr 11 2020

Keywords

Comments

It might appear that all terms are either the product of two consecutive primes or two primes with a prime in between (A333747). However, 253=11*23 is the first term that is not in that sequence.
The easiest optimal permutation of n primes is probably {p_1, p_n, p_2, p_n-1, …, p_ceiling(n/2)}. - Ivan N. Ianakiev, Apr 20 2020

Examples

			Here are the different ways to arrange the first 4 primes in a circle.
  2-3
  | |  Products: 6, 21, 35, 10. Largest product: 35.
  5-7
.
  2-3
  | |  Products: 6, 15, 35, 14. Largest product: 35.
  7-5
.
  2-5
  | |  Products: 10, 15, 21, 14. Largest product: 21.
  7-3
The minimum largest product is 21, so a(4)=21.
		

Crossrefs

Programs

  • Mathematica
    primes[n_]:=Prime/@Range[n];
    partition[n_]:=Partition[primes[n],UpTo[Ceiling[n/2]]];
    riffle[n_]:=Riffle[partition[n][[1]],Reverse[partition[n][[2]]]];
    a[n_]:=Max[Table[riffle[n][[i]]*riffle[n][[i+1]],{i,1,n-1}]];
    a/@Range[2,60] (* Ivan N. Ianakiev, Apr 20 2020 *)
  • PARI
    a(n) = {my(x = oo); for (k=1, (n-1)!, my(vp = Vec(numtoperm(n, k-1))); vp = apply(x->prime(x), vp); x = min(x, max(vp[1]*vp[n-1], vecmax(vector(n-1, j, vp[j]*vp[j+1]))));); x;} \\ Michel Marcus, Apr 14 2020

Formula

Probably a(n) = A332765(n+1) for n > 4.

Extensions

a(12)-a(13) from Michel Marcus, Apr 14 2020
a(14) from Alois P. Heinz, Apr 15 2020
a(15)-a(22) from Giovanni Resta, Apr 19 2020
More terms from Ivan N. Ianakiev, Apr 20 2020

A331693 Number of Tom graphs with n vertices.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 37, 76, 153, 328, 705, 1576, 3551, 8179, 18980, 44559, 105111, 249426, 593484, 1416269, 3384581, 8099819, 19398194, 46487665, 111447044, 267260387, 641022947, 1537706522, 3688974818, 8850411933, 21234093757, 50946316856, 122234742311
Offset: 0

Author

Bobby Jacobs, Jan 24 2020

Keywords

Comments

This sequence is from a Project Euler problem called "Tom and Jerry". A cat named Tom and a mouse named Jerry play a game on a graph G. Each vertex of G is a mousehole. Jerry starts in one of the vertices. Every day, Tom tries to catch Jerry in one of the holes. If there is a vertex adjacent to Jerry's hole, then Jerry moves to one of the adjacent holes. A Tom graph is a graph on which Tom can always catch Jerry by following a sequence of holes.
All Tom graphs are loop-free graphs, but not all loop-free graphs are Tom graphs. The smallest loop-free graph that is not a Tom graph has 10 vertices:
1
|
2
|
3
|
4
/ \
5 8
/ \
6 9
/ \
7 10
From Hugo Pfoertner, Feb 20 2020 (Start):
The sequence is an equivalent of A005195 (number of forests with n unlabeled nodes), but made from trees that don't have the unlabeled 10-node graph shown above as a subgraph. This is described in the comment of A300576 and there is also a link to Christian Perfect's website.
In order to find a term of the current sequence, the number of trees containing the shown subgraph must be subtracted from the total number A000055. For n = 10 this is exactly one, for n = 11 it is trivially 4 and for n = 12 it is 19 (A130132).
The marked illustrations from the Steinbach graph catalog show these manually counted tree graphs.
The formulas of A005195 (Euler transform) can then be used to calculate the number of forests if the reduced number of trees A130131 is used instead of A000055. (End)
a(0) = 1: the empty graph is a Tom graph, since Jerry cannot hide from Tom. - Rainer Rosenthal, Mar 01 2020

Examples

			The graph
  1---2---3
is a Tom graph: Tom can follow the sequence 2, 2 to guarantee that he catches Jerry.
The graph
    1
   / \
  2---3
is not a Tom graph: Jerry always has 2 vertices to go to, and whatever vertex Tom picks, Jerry can choose another to evade Tom.
		

Crossrefs

Formula

a(n) <= A005195(n) with equality only for n in {1, ..., 9}.

Extensions

a(11)-a(12) from Hugo Pfoertner, Feb 20 2020
a(0), a(13)-a(33) from Rainer Rosenthal, Feb 29 2020

A292431 Numbers n with record numbers of unordered triples {a, b, c} of distinct positive integers from 1 to n such that a*b = c*n.

Original entry on oeis.org

0, 6, 10, 12, 18, 20, 24, 30, 36, 40, 42, 48, 56, 60, 72, 84, 90, 108, 120, 144, 168, 180, 210, 240, 280, 300, 330, 336, 360, 420, 480, 504, 540, 600, 630, 660, 720, 840, 1008, 1080, 1200, 1260, 1440, 1560, 1680, 1980, 2100, 2160, 2310, 2340
Offset: 1

Author

Bobby Jacobs and Robert G. Wilson v, Sep 30 2017

Keywords

Comments

Numbers n with record numbers of ordered triples {a, b, c} such that a*b = c*n with c < a < b < n.

Examples

			There are 4 unordered triples {a, b, c} of distinct positive integers from 1 to 10 such that a*b = c*10:
  {2, 5, 1}: 2*5 = 1*10 = 10;
  {4, 5, 2}: 4*5 = 2*10 = 20;
  {5, 6, 3}: 5*6 = 3*10 = 30;
  {5, 8, 4}: 5*8 = 4*10 = 40.
This is more than any n < 10, so 10 is in this sequence.
		

Crossrefs

Where records occur in A278648.
Cf. A292430.

A292430 Record numbers of unordered triples {a, b, c} of distinct positive integers from 1 to n such that a*b = c*n.

Original entry on oeis.org

0, 2, 4, 8, 13, 16, 26, 38, 46, 50, 56, 71, 74, 120, 136, 176, 193, 214, 330, 355, 482, 574, 668, 839, 890, 996, 1088, 1223, 1528, 1920, 2039, 2224, 2374, 2646, 3055, 3120, 3811, 5010, 5539, 6208, 6591, 8566, 9139, 9690, 12359, 13894, 14796, 15331, 16118, 16558
Offset: 1

Author

Bobby Jacobs and Robert G. Wilson v, Sep 30 2017

Keywords

Comments

Record numbers of ordered triples {a, b, c} of positive integers such that a*b = c*n with c < a < b < n.

Examples

			There are 4 unordered triples {a, b, c} of distinct positive integers from 1 to 10 such that a*b = c*10:
  {2, 5, 1}: 2*5 = 1*10 = 10;
  {4, 5, 2}: 4*5 = 2*10 = 20;
  {5, 6, 3}: 5*6 = 3*10 = 30;
  {5, 8, 4}: 5*8 = 4*10 = 40.
This is more than any n < 10, so 4 is in this sequence.
		

Crossrefs

Records in A278648.
Cf. A292431.

Formula

a(n) = A278648(A292431(n)).

A292423 a(n) = 82*a(n-1) + a(n-2), where a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 82, 6725, 551532, 45232349, 3709604150, 304232772649, 24950796961368, 2046269583604825, 167819056652557018, 13763208915093280301, 1128750950094301541700, 92571341116647819699701, 7591978722515215516917182, 622634826587364320206908625
Offset: 0

Author

Bobby Jacobs, Sep 18 2017

Keywords

Comments

Every fifth term of A000129 is divisible by 29. Dividing every fifth term by 29 gives this sequence.

Crossrefs

Cf. A000129.

Programs

  • Magma
    m:=20; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x/(1-82*x-x^2) )); // G. C. Greubel, Feb 02 2019
    
  • Maple
    a:= n-> (<<0|1>, <1|82>>^n)[1, 2]:
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 18 2017
  • Mathematica
    CoefficientList[Series[x/(1-82*x-x^2), {x,0,20}], x] (* G. C. Greubel, Feb 02 2019 *)
    LinearRecurrence[{82,1},{0,1},20] (* Harvey P. Dale, Dec 20 2024 *)
  • PARI
    a(n) = ([82, 1; 1, 0]^n)[2, 1]; \\ Altug Alkan, Sep 18 2017
    
  • PARI
    concat(0, Vec(x / (1 - 82*x - x^2) + O(x^20))) \\ Colin Barker, Sep 20 2017
    
  • Sage
    (x/(1-82*x-x^2)).series(x, 20).coefficients(x, sparse=False) # G. C. Greubel, Feb 02 2019

Formula

a(n) = A000129(5*n)/29.
From Colin Barker, Sep 20 2017: (Start)
G.f.: x / (1 - 82*x - x^2).
a(n) = (((-41-29*sqrt(2))^(-n)*(-1 + (-3363-2378*sqrt(2))^n))) / (58*sqrt(2)).
(End)

A292191 Decimal expansion of zeta(zeta(2)).

Original entry on oeis.org

2, 1, 7, 2, 6, 3, 2, 0, 5, 7, 2, 8, 5, 7, 6, 2, 8, 7, 1, 6, 2, 8, 3, 1, 5, 4, 3, 4, 4, 4, 8, 0, 9, 3, 2, 3, 4, 3, 9, 4, 4, 9, 2, 8, 8, 4, 9, 4, 6, 4, 4, 3, 7, 9, 9, 3, 3, 6, 9, 3, 6, 2, 4, 9, 4, 6, 6, 7, 9, 3, 2, 2, 4, 8, 0, 9, 9, 8, 2, 1, 4, 5, 0, 3, 1, 4, 9, 4, 3, 8, 4, 6, 5, 6, 8, 2, 0, 1, 5, 4, 5, 1, 6, 3, 5
Offset: 1

Author

Bobby Jacobs, Sep 11 2017

Keywords

Examples

			2.1726320572857628716283154344480932343944...
		

Crossrefs

Cf. A013661.

Programs

  • Maple
    evalf(Zeta(Zeta(2)), 100); # Wesley Ivan Hurt, Sep 11 2017
  • Mathematica
    First[RealDigits[Zeta[Zeta[2]], 10, 100]] (* Paolo Xausa, Mar 20 2024 *)
  • PARI
    zeta(zeta(2)) \\ Michel Marcus, Sep 11 2017

A288291 Position of the first time an n-digit number appears twice in a row after the decimal point of e.

Original entry on oeis.org

31, 49, 97, 2, 112869, 5005575, 1561314, 69682897, 1841794338
Offset: 1

Author

Bobby Jacobs, Sep 01 2017

Keywords

Comments

18281828 appears in e before any 1-digit, 2-digit, or 3-digit number appears twice in a row.

Examples

			a(1) = 31 because the first time a 1-digit number appears twice in a row in the decimal expansion of e is 31 digits after the decimal point: 2.718281828459045235360287471352(66)...
		

Crossrefs

Programs

  • Mathematica
    s = First@ RealDigits[E, 10, 51*^5]; Table[p = Partition[s, k, 1];
    SelectFirst[ Range[ Length[p] - k], p[[#]] == p[[# + k]] &] - 1, {k, 7}] (* Giovanni Resta, Sep 05 2017 *)

Extensions

a(6)-a(8) from Giovanni Resta, Sep 05 2017
a(9) from Michael S. Branicky, Jan 20 2023

A287994 Position of the first time an n-digit number appears twice in a row after the decimal point of Pi.

Original entry on oeis.org

24, 413, 326, 8239, 107472, 1632152, 9719518, 106235025
Offset: 1

Author

Bobby Jacobs, Sep 01 2017

Keywords

Comments

209209 and 305305 appear in Pi before any 2-digit number appears twice in a row.

Examples

			a(1) = 24 because the first time a 1-digit number appears twice in a row in the decimal expansion of Pi is 24 digits after the decimal point: 3.14159265358979323846264(33)...
		

Crossrefs

Programs

  • Mathematica
    s = First@ RealDigits[Pi,10,10^7]; Table[p = Partition[s,k,1];
    SelectFirst[ Range[ Length[p] - k], p[[#]] == p[[# + k]] &] - 1, {k, 7}] (* Giovanni Resta, Sep 05 2017 *)
  • Python
    from sympy import S
    # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
    # with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
    pi_digits = str(S.Pi.n(2*10**5))[:-1] # alternative to above
    pi_digits = pi_digits.replace(".", "")
    def a(n):
        idx = 1
        while pi_digits[idx:idx+n] != pi_digits[idx+n:idx+2*n]:
            idx += 1
            assert idx + 2*n < len(pi_digits), "increase precision"
        return idx
    print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Apr 24 2022

Extensions

a(8) from Michael S. Branicky, Apr 24 2022