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: José Hernández

José Hernández's wiki page.

José Hernández has authored 13 sequences. Here are the ten most recent ones:

A387014 Middle element of the list {1, 2, 3, ..., 2n-1} when elements are sorted lexicographically by their Roman numeral representations.

Original entry on oeis.org

1, 2, 3, 4, 9, 5, 6, 7, 8, 10, 11, 12, 13, 14, 19, 15, 16, 17, 18, 20, 18, 17, 16, 15, 48, 47, 46, 45, 49, 44, 43, 42, 41, 40, 19, 14, 13, 12, 11, 10, 8, 7, 6, 5, 88, 5, 6, 7, 8, 10, 8, 7, 6, 5, 88, 87, 86, 85, 89, 84, 83, 82, 81, 80, 78, 77, 76, 75, 79, 74, 73, 72, 71, 70
Offset: 1

Author

José Hernández, Aug 13 2025

Comments

Usual Roman numeral representations are taken as ending at 3999 so that here n <= 2000.
a(21) = 18 is the first repeated element, and 21 is also the least positive integer not in this sequence, which has 1690 distinct terms. More exhaustively, the positive integers not in this sequence are 21 .. 39, 90 .. 100, 200 .. 236, 239 .. 399, 450 .. 484, 489, 900 .. 999, 1005 .. 1008, 1010 .. 1049, 1090 .. 1099, 2001 .. 2099, 2101 .. 2199, 2205 .. 2208, 2210 .. 2249, 2251 .. 2299 and 2400 .. oo (where a .. b means all integers from a to b). - M. F. Hasler, Aug 18 2025

Examples

			For n = 5, the 2n-1 list elements sorted by Roman numerals are I, II, III, IV, IX, V, VI, VII, VIII and the middle element is IX = 9 = a(5).
		

Crossrefs

Cf. A036742.

Programs

  • Mathematica
    Table[SortBy[Range[2*n-1], RomanNumeral][[n]], {n, 100}] (* Misha Lavrov via SeqFan *)
  • Python
    import roman
    def A387014(n):
        return roman.fromRoman(sorted(roman.toRoman(k)for k in range(1,2*n))[n-1]) # M. F. Hasler, Aug 18 2025

A386978 Numbers k such that the k-th prime gap contains an integer whose least prime factor is greater than or equal to the length of the prime gap.

Original entry on oeis.org

2, 3, 5, 7, 10, 13, 15, 17, 20, 21, 26, 28, 32, 33, 34, 35, 37, 39, 41, 42, 43, 45, 47, 49, 52, 53, 54, 55, 57, 60, 61, 64, 66, 68, 69, 72, 73, 74, 77, 79, 81, 83, 84, 87, 89, 92, 94, 98, 99, 101, 102, 104, 106, 107, 109, 111, 113, 114, 116, 118, 120, 121, 123
Offset: 1

Author

José Hernández, Aug 11 2025

Keywords

Comments

If p and q are twin primes and p

Examples

			1 does not belong to this sequence because the first prime gap is (2,3). The second prime gap is (3,5); since the length of this interval is 5-3=2 and 4 belongs to it, we have that 2 is the first term of the sequence.
		

Crossrefs

Cf. A001223.

Programs

  • Maple
    q:= k-> ((p, r)-> ormap(f-> min(ifactors(f)[2][..., 1])>=
              r-p, [$p+1..r-1]))((map(ithprime, [k, k+1])[])):
    select(q, [$1..123])[];  # Alois P. Heinz, Aug 12 2025
  • Mathematica
    For[n = 1, n <= 200, n++, k = Prime[n];
    count = 0;
    While[k < Prime[n+1], If[FactorInteger[k][[1,1]] < Prime[n+1] - Prime[n], count = count+1]; k++;];
    If[count == Prime[n+1] - Prime[n] - 1, , Print[n]]]
    (* This code outputs all the terms of the sequence in the interval [1, 200]. *)

A368049 Perfect squares whose decimal expansion consists of k > 1 digits, k-1 of which are equal.

Original entry on oeis.org

16, 25, 36, 49, 64, 81, 100, 121, 144, 225, 400, 441, 484, 676, 900, 1444, 10000, 40000, 44944, 90000, 1000000, 4000000, 9000000, 100000000, 400000000, 900000000, 10000000000, 40000000000, 90000000000, 1000000000000, 4000000000000, 9000000000000, 100000000000000
Offset: 1

Author

José Hernández, Dec 09 2023

Keywords

Comments

The terms > 90000 are of one of the following three forms: 10^(2*j), 4*10^(2*j) or 9*10^(2*j) where j is an integer >= 3.
See Gica/Panaitopol link for proof of above comment. - Ray Chandler, Jan 16 2024

Crossrefs

Subsequence of A000290.

Formula

a(n) = 100*a(n-3) for n > 22. - Stefano Spezia, Dec 09 2023

A359610 Numbers k such that the sum of the 5th powers of the digits of k is prime.

Original entry on oeis.org

11, 101, 110, 111, 119, 128, 133, 182, 188, 191, 218, 223, 227, 229, 232, 247, 272, 274, 281, 292, 313, 322, 331, 337, 346, 359, 364, 368, 373, 377, 379, 386, 395, 397, 427, 436, 463, 472, 478, 487, 539, 557, 568, 575, 577, 586, 593, 634, 638, 643, 658, 667
Offset: 1

Author

José Hernández, Jan 06 2023

Keywords

Comments

It is easy to establish that the sequence is infinite: if x is in the sequence, so is 10*x.
Alternatively: the sequence is infinite as the sequence contains all numbers consisting of a prime number of 1s and an arbitrary number of 0s. - Charles R Greathouse IV, Jan 06 2023

Examples

			11 is a term since 1^5 + 1^5 = 2 is prime.
		

Crossrefs

A031974 is a subsequence.
Cf. A055014 (sum of the 5th powers of digits).

Programs

  • Mathematica
    top = 999; (* Find all terms <= top *)
    For[t = 11, t <= top, t++, k = IntegerLength[t]; sum = 0;
       For[e = 0, e <= k - 1, e++, sum = sum + NumberDigit[t, e]^5];
          If[PrimeQ[sum] == True, Print[t]]]
    Select[Range[670],PrimeQ[Total[IntegerDigits[#]^5]] &] (* Stefano Spezia, Jan 08 2023 *)
  • PARI
    isok(k) = isprime(vecsum(apply(x->x^5, digits(k)))); \\ Michel Marcus, Jan 07 2023

A359449 Positive integers in which the sum of the k-th powers of their digits is a prime number for k = 1, 2, 3, 4, 5, and 6 but not for k=7.

Original entry on oeis.org

223, 232, 322, 1349, 1394, 1439, 1493, 1934, 1943, 2023, 2032, 2203, 2230, 2302, 2320, 3022, 3149, 3194, 3202, 3220, 3419, 3491, 3914, 3941, 4139, 4193, 4319, 4391, 4913, 4931, 9134, 9143, 9314, 9341, 9413, 9431, 10349, 10394, 10439, 10493, 10934, 10943, 13049, 13094, 13409, 13490, 13904, 13940
Offset: 1

Author

José Hernández, Jan 02 2023

Keywords

Examples

			223 belongs to this sequence because 2+2+3=7, 2^2+2^2+3^2=17, 2^3+2^3+3^3=43, 2^4+2^4+3^4=113, 2^5+2^5+3^5=307, and 2^6+2^6+3^6=857 are prime numbers whereas 2^7+2^7+3^7 is a composite number.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,t,k;
      L:= convert(n,base,10);
      andmap(isprime, [seq(add(t^k,t=L),k=1..6)]) and not isprime(add(t^7,t=L))
    end proc:
    select(filter, [$1..20000]); # Robert Israel, Jan 03 2023
  • Mathematica
    For[a = 0, a <= 9, a++,
     For[b = 0, b <= 9, b++,
     For[c = 0, c <= 9, c++,
     For[d = 0, d <= 9, d++,
       If[PrimeQ[a + b + c + d] == True &&
          PrimeQ[a^2 + b^2 + c^2 + d^2] == True &&
          PrimeQ[a^3 + b^3 + c^3 + d^3] == True &&
          PrimeQ[a^4 + b^4 + c^4 + d^4] == True &&
          PrimeQ[a^5 + b^5 + c^5 + d^5] == True &&
          PrimeQ[a^6 + b^6 + c^6 + d^6] == True &&
          PrimeQ[a^7 + b^7 + c^7 + d^7] == False, Print[a, b, c, d]]]]]]
    (* This code outputs all the terms of the sequence in the interval [1,10^4]. *)
  • PARI
    isok(n) = my(d=digits(n)); for (i=1, 6, if (!isprime(sum(k=1,#d, d[k]^i)), return(0))); !isprime(sum(k=1,#d, d[k]^7)); \\ Michel Marcus, Jan 02 2023

A347933 Positive integers that can't be written in the form a+b+c for some positive integers a, b, and c satisfying gcd(a,b)=1, gcd(a,c)>1, and gcd(b,c)>1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 22, 24, 30, 36, 42, 48, 60, 84, 90, 210
Offset: 1

Author

José Hernández, Sep 20 2021

Keywords

Examples

			1 and 2 are the first two terms of the sequence because they can't even be written as sums of three positive integers.
3 is the third term of the sequence because there is only one way to express it as a sum of three positive integers (1+1+1).
11 does not belong to the sequence because 11=2+3+6 (and gcd(2,3)=1, gcd(2,6)=2, and gcd(3,6)=3).
		

References

  • Freddy Barrera, Bernardo Recamán, and Stan Wagon, Sums of triples with one pair relatively prime. American Mathematical Monthly, 127 (2020), no. 1, pp. 89-90.

Crossrefs

Programs

  • Mathematica
    Select[Range@210,Select[Flatten[Permutations/@IntegerPartitions[#,{3}],1],GCD[#[[1]],#[[2]]]==1&&GCD[#[[1]],#[[3]]]>1&&GCD[#[[2]],#[[3]]]>1&]=={}&] (* Giorgos Kalogeropoulos, Sep 20 2021 *)

A299030 Number of vertices in the iterated clique graphs of the 1-skeleton of Plato's octahedron.

Original entry on oeis.org

6, 8, 16, 256, 340282366920938463463374607431768211456
Offset: 0

Author

José Hernández, Feb 01 2018

Keywords

Comments

The octahedron was the first known example of a k-divergent graph.

Examples

			By definition, the zeroth iterated clique graph of a graph G is equal to G itself; since the octahedron has 6 vertices, a(0)=6.
The first iterated clique graph of the octahedron has 8 vertices; hence, a(1)=8.
		

Crossrefs

Programs

  • Mathematica
    Nest[Sqrt[2]^#&, 6, n] (* Omar Antolín-Camarena, May 16 2022 *)
  • YAGS
    K:=CliqueGraph;; g:=Octahedron;; kg:=K(g);; Order(kg);
    # It outputs the number of vertices in the first iterated
    # clique graph of the octahedron.

Formula

a(n) = sqrt(2)^sqrt(2)^...^sqrt(2)^6 with n occurrences of sqrt(2). - Omar Antolín-Camarena, May 16 2022

Extensions

a(4) from Omar Antolín-Camarena, May 16 2022

A299028 Number of vertices in the iterated clique graphs of the 1-skeleton of Plato's icosahedron.

Original entry on oeis.org

12, 20, 32, 92, 472
Offset: 0

Author

José Hernández, Feb 01 2018

Keywords

Comments

It is known that the sequence of orders of the iterated clique graphs of the icosahedron goes to infinity.

Examples

			By definition, the zeroth iterated clique graph of a graph G is equal to G itself; since the icosahedron has 12 vertices, a(0)=12.
The first iterated clique graph of the icosahedron has 20 vertices; hence, a(1)=20.
		

Crossrefs

Programs

  • YAGS
    K:=CliqueGraph;; g:=Icosahedron;; kg:=K(g);; Order(kg);
    # It outputs the number of vertices in the first iterated
    # clique graph of the icosahedron.

A295866 Number of decimal digits in the number of partitions of n.

Original entry on oeis.org

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

Author

José Hernández, Feb 13 2018

Keywords

Comments

In his book on analytic number theory, Don Newman tells this amusing story regarding the number of digits in p(n): "This is told of Major MacMahon who kept a list of these partition numbers arranged one under another up into the hundreds. It suddenly occurred to him that, viewed from a distance, the outline of the digits seemed to form a parabola! Thus the number of digits in p(n), the number of partitions of n, is around C*sqrt(n), or p(n) itself is very roughly e^(a*sqrt(n)). The first crude assessment of p(n)!"

References

  • D. J. Newman, Analytic number theory, Springer Verlag, 1998, p. 17.

Crossrefs

Programs

  • Mathematica
    Join[{1}, IntegerLength[PartitionsP[#]] & /@ Range[99]]
  • PARI
    a(n) = #digits(numbpart(n)); \\ Michel Marcus, Feb 17 2018

Formula

a(n) = A055642(A000041(n)).

A295868 Initial digit of the number of partitions of n.

Original entry on oeis.org

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

Author

José Hernández, Feb 13 2018

Keywords

Crossrefs

Programs

  • Mathematica
    (* The first one hundred terms of the sequence *)
    Join[{1}, First[IntegerDigits[PartitionsP[#]]] & /@ Range[99]]
    f[n_] := Block[{p = PartitionsP@ n}, Floor[p/10^Floor@ Log10@ p]]; Array[f, 105, 0] (* Robert G. Wilson v, Feb 18 2018 *)
  • PARI
    a(n) = digits(numbpart(n))[1]; \\ Michel Marcus, Feb 16 2018

Formula

a(n) = A000030(A000041(n)).