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.

Previous Showing 61-70 of 270 results. Next

A346068 Numbers that are the product of distinct primes with prime subscripts raised to prime powers.

Original entry on oeis.org

1, 9, 25, 27, 121, 125, 225, 243, 289, 675, 961, 1089, 1125, 1331, 1681, 2187, 2601, 3025, 3125, 3267, 3375, 3481, 4489, 4913, 6075, 6889, 7225, 7803, 8649, 11881, 11979, 15125, 15129, 16129, 24025, 24649, 25947, 27225, 28125, 29403, 29791, 30375, 31329, 32041, 33275, 34969
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 30 2021

Keywords

Examples

			675 = 3^3 * 5^2 = prime(prime(1))^prime(2) * prime(prime(2))^prime(1), therefore 675 is a term.
		

Crossrefs

Intersection of A056166 and A076610.

Programs

  • Mathematica
    Join[{1}, Select[Range[35000], AllTrue[Join[PrimePi[(t = Transpose @ FactorInteger[#])[[1]]], t[[2]]], PrimeQ] &]] (* Amiram Eldar, Jul 30 2021 *)
  • Python
    from sympy import factorint, isprime, primepi
    def ok(n):
        f = factorint(n)
        if not all(isprime(e) for e in f.values()): return False
        return all(isprime(primepi(p)) for p in f)
    print(list(filter(ok, range(35000)))) # Michael S. Branicky, Jul 30 2021

Formula

Sum_{n>=1} 1/a(n) = Product_{p in A006450} (1 + Sum_{q prime} 1/p^q) = 1.2271874... - Amiram Eldar, Jul 31 2021

A237284 Number of ordered ways to write 2*n = p + q with p, q and A000720(p) all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 06 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 6, 13, 16, 19, 28, 34, 40, 61, 166, 278.
This is stronger than Goldbach's conjecture.
The conjecture is true for n <= 5*10^8. - Dmitry Kamenetsky, Mar 13 2020

Examples

			a(13) = 1 since 2*13 = 3 + 23 with 3, 23 and A000720(3) = 2 all prime.
a(278) = 1 since 2*278 = 509 + 47 with 509, 47 and A000720(509) = 97 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2n-Prime[Prime[k]]],1,0],{k,1,PrimePi[PrimePi[2n-1]]}]
    Table[a[n],{n,1,80}]

A330943 Matula-Goebel numbers of singleton-reduced rooted trees.

Original entry on oeis.org

1, 2, 4, 6, 7, 8, 12, 13, 14, 16, 18, 19, 21, 24, 26, 28, 32, 34, 36, 37, 38, 39, 42, 43, 48, 49, 52, 53, 54, 56, 57, 61, 63, 64, 68, 72, 73, 74, 76, 78, 82, 84, 86, 89, 91, 96, 98, 101, 102, 104, 106, 107, 108, 111, 112, 114, 117, 119, 122, 126, 128, 129, 131
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2020

Keywords

Comments

These trees are counted by A330951.
A rooted tree is singleton-reduced if no non-leaf node has all singleton branches, where a rooted tree is a singleton if its root has degree 1.
The Matula-Goebel number of a rooted tree is the product of primes of the Matula-Goebel numbers of its branches. This gives a bijective correspondence between positive integers and unlabeled rooted trees.
A prime index of n is a number m such that prime(m) divides n. A number belongs to this sequence iff it is 1 or its prime indices all belong to this sequence but are not all prime.

Examples

			The sequence of all singleton-reduced rooted trees together with their Matula-Goebel numbers begins:
   1: o
   2: (o)
   4: (oo)
   6: (o(o))
   7: ((oo))
   8: (ooo)
  12: (oo(o))
  13: ((o(o)))
  14: (o(oo))
  16: (oooo)
  18: (o(o)(o))
  19: ((ooo))
  21: ((o)(oo))
  24: (ooo(o))
  26: (o(o(o)))
  28: (oo(oo))
  32: (ooooo)
  34: (o((oo)))
  36: (oo(o)(o))
  37: ((oo(o)))
		

Crossrefs

The series-reduced case is A291636.
Unlabeled rooted trees are counted by A000081.
Numbers whose prime indices are not all prime are A330945.
Singleton-reduced rooted trees are counted by A330951.
Singleton-reduced phylogenetic trees are A000311.
The set S of numbers whose prime indices do not all belong to S is A324694.

Programs

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

A073124 a(n) = prime(1+prime(n)) - prime(prime(n)).

Original entry on oeis.org

2, 2, 2, 2, 6, 2, 2, 4, 6, 4, 4, 6, 2, 2, 12, 10, 4, 10, 6, 6, 6, 8, 2, 2, 12, 10, 6, 6, 2, 2, 10, 4, 14, 12, 4, 4, 10, 4, 6, 2, 6, 4, 10, 10, 12, 6, 4, 14, 6, 4, 10, 12, 8, 4, 6, 24, 10, 6, 2, 8, 14, 18, 2, 6, 2, 12, 16, 4, 6, 6, 2, 6, 26, 2, 8, 10, 4, 10, 4
Offset: 1

Views

Author

Labos Elemer, Jul 16 2002

Keywords

Comments

Number of entries in {x,..} such that pi(x) = prime(n).

Examples

			For n = 25: prime(25) = 97, pi(x) = 97 holds for 12 numbers x: {509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520} so a(25) = 12. The largest 520 = A073123(25), and the smallest = A006450(25).
		

Crossrefs

Programs

  • Mathematica
    Table[Prime[Prime[n]+1]-Prime[Prime[n]], {n, 1, 256}]
    seq[max_] := Module[{p = Prime[Range[max + 1]], m = PrimePi[max], ind}, ind = Prime[Range[m]]; p[[ind + 1]] - p[[ind]]]; seq[400] (* Amiram Eldar, Feb 15 2025 *)
  • PARI
    a(n) =  prime(1+prime(n)) - prime(prime(n)); \\ Michel Marcus, Dec 11 2013

Formula

a(n) = Card{x; A000720(x) = A000040(n)}.
a(n) = A072677(n) - A006450(n).

Extensions

More terms from Michel Marcus, Dec 11 2013

A050439 Fifth-order composites.

Original entry on oeis.org

39, 49, 55, 56, 60, 69, 74, 77, 78, 84, 93, 94, 95, 100, 105, 106, 110, 115, 119, 124, 125, 126, 130, 133, 140, 141, 145, 152, 155, 156, 159, 162, 164, 165, 170, 174, 180, 183, 184, 188, 189, 198, 201, 202, 203, 206, 207, 209, 212, 213, 218, 222, 225, 231
Offset: 1

Views

Author

Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999

Keywords

Examples

			C(C(C(C(C(8))))) = C(C(C(C(15)))) = C(C(C(25))) = C(C(38)) = C(55) = 77. So 77 is in the sequence.
		

Crossrefs

Programs

  • Maple
    C := remove(isprime,[$4..1000]): seq(C[C[C[C[C[n]]]]],n=1..100);

Formula

Let C(n) be the n-th composite number, with C(1)=4. Then these are numbers C(C(C(C(C(n))))).

Extensions

More terms from Asher Auel Dec 15 2000

A096478 a(n) = A000040(A096477(n)), i.e., prime(a(n)) and prime(a(n)+1) are twin primes.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 41, 43, 83, 89, 109, 113, 173, 277, 307, 313, 353, 373, 463, 563, 577, 601, 613, 643, 673, 719, 743, 1117, 1123, 1171, 1279, 1571, 1621, 1627, 1709, 1741, 1823, 1867, 1907, 1949, 1979, 1987, 1999, 2003, 2063, 2099, 2153, 2287, 2309, 2311
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Comments

Gives primes in A029707. - Pierre CAMI, Apr 20 2006

Examples

			89 is a term since it is a prime and prime(89 + 1) - prime(89) = 463 - 461 = 2; the prime with subscript 89 (which is prime) and the next prime (i.e., prime(90)) are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Prime[Flatten[Position[Table[Prime[Prime[n]+1]-Prime[Prime[n]], {n, 1, 1000}], 2]]]

A141436 Tisdale's sieve: generators for an infinite set of disjoint prime/nonprime sequences (see Comments for precise definition).

Original entry on oeis.org

1, 3, 5, 8, 10, 11, 14, 15, 16, 17, 20, 22, 24, 25, 27, 30, 31, 32, 33, 35, 36, 38, 39, 40, 41, 44, 46, 48, 49, 50, 51, 54, 55, 56, 58, 59, 62, 63, 64, 66, 67, 68, 69, 70, 72, 75, 76, 77, 78, 80, 82, 83, 85, 86, 87, 88, 90, 92, 93, 94, 96, 99, 100, 102, 104, 105, 108, 109, 110, 111
Offset: 1

Views

Author

Daniel Tisdale, Aug 06 2008

Keywords

Comments

The definition: (Start)
Let P = (2,3,5,...) and N = (1,4,6,...) denote the sequences of primes and nonprimes, respectively.
Construct an infinite collection of disjoint sequences S_1, S_2, S_3, ... as follows.
For S_i, the first term S_i(1) is the smallest positive integer not yet used in any S_j with j < i.
Thereafter S_i is extended by the rule S_i(j+1) = either P(S_i(j)) or N(S_i(j)), where we choose P or N so that the primes and nonprimes alternate in S_i.
Then the sequence consists of the initial values S_1(1), S_2(1), S_3(1), ...
We find that S_1 = {1,2,4,7,12,...} (A280028), with smallest missing number 3,
S_2 = {3,6,13,...} (A280029), so now the smallest missing number is 5,
S_3 = {5,9,23,...} (A280030), and so on.
So the sequence begins 1,3,5,...
(End)
Note that the disjointness is a consequence of the definition. For if S_i and S_j have a common term, let S_i(q) = S_j(r) = X (say) be the first time they meet. Then either one or both of q and r are 1, which is impossible by the construction, or q > 1, r > 1. But then S_i(q-1) = S_j(r-1), which is a contradiction. - N. J. A. Sloane, Dec 28 2016
The complementary sequence is 2, 4, 6, 7, 9, 12, 13, 18, 19, etc., see A141437.
The old definition was: "a(k) = k-th prime or nonprime: a(k+1) = a(a(k)); if k is prime, a(k) is nonprime; if k is nonprime, a(k) is prime. {a(1)} = {1,2,4,7,12,...}, {a(3)} = {3,6,13,...}, {a(5)} = {5,9,23,...}. The generators of these mutually disjoint sets are the first elements, {1,3,5,8, etc.}."

Crossrefs

Formula

Conjecture: Equals A102615 UNION A006450. - R. J. Mathar, Aug 14 2008
Proof of Conjecture, from David Applegate, Dec 28 2016: (Start)
First, a simple lemma about simple sieves (doesn't apply to the Sieve of Eratosthenes):
Lemma: Let f be a function mapping positive integers to positive integers, with f(n) > n for all n.
Construct an infinite collection of (not necessarily disjoint) sequences S_1, S_2, S_3, ... as follows.
For S_i, the first term S_i(1) is the smallest positive integer not yet used in any S_j with j < i.
Thereafter S_i is extended by the rule S_i(j+1) = f(S_i(j)) = f^j (S_i(1)).
Then the sequence of initial values S_1(1), S_2(1), S_3(1), ... consists of the positive integers not in the image of f().
Proof: Obviously, if n is not in the image of f(), it can never occur as S_i(j) for j > 1, so it will eventually occur as S_i(1) for some i.
Conversely, if n is in the image of f(), it will occur as S_i(j) for some i and j > 1 such that S_i(1) < n, and hence will not occur as an initial value. We show this by induction n: Let n = f(m) (so m < n). If m is in the image of f(), then by induction it occurs as S_i(j) for some i and j>1, so n=S_i(j+1). Otherwise, if m is not in the image of f(), then it will occur as S_i(1) for some i, so n=S_i(2).
To apply the lemma, just define f(n) = P(n) if n is nonprime, N(n) if n is prime. So, the sequence of initial values will consist of:
primes p such that p does not equal P(n) for n nonprime (A006450) and
nonprimes n such that n does not equal N(p) for p prime (A192615).
(End)

Extensions

Edited (including a new name) by N. J. A. Sloane, Dec 25 2016

A320630 Products of primes of nonprime squarefree index.

Original entry on oeis.org

2, 4, 8, 13, 16, 26, 29, 32, 43, 47, 52, 58, 64, 73, 79, 86, 94, 101, 104, 113, 116, 128, 137, 139, 146, 149, 158, 163, 167, 169, 172, 181, 188, 199, 202, 208, 226, 232, 233, 256, 257, 269, 271, 274, 278, 292, 293, 298, 313, 316, 317, 326, 334, 338, 344, 347
Offset: 1

Views

Author

Gus Wiseman, Oct 18 2018

Keywords

Comments

The index of a prime number n is the number m such that n is the m-th prime.

Examples

			The sequence of terms begins:
    2 = prime(1)
    4 = prime(1)^2
    8 = prime(1)^3
   13 = prime(6)
   16 = prime(1)^4
   26 = prime(1)*prime(6)
   29 = prime(10)
   32 = prime(1)^5
   43 = prime(14)
   47 = prime(15)
   52 = prime(1)^2*prime(6)
   58 = prime(1)*prime(10)
   64 = prime(1)^6
   73 = prime(21)
   79 = prime(22)
   86 = prime(1)*prime(14)
   94 = prime(1)*prime(15)
  101 = prime(26)
  104 = prime(1)^3*prime(6)
  113 = prime(30)
  116 = prime(1)^2*prime(10)
  128 = prime(1)^7
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],With[{f=PrimePi/@First/@FactorInteger[#]},And[And@@SquareFreeQ/@f,And@@Not/@PrimeQ/@f]]&]

A330948 Nonprime numbers whose prime indices are not all prime numbers.

Original entry on oeis.org

4, 6, 8, 10, 12, 14, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 34, 35, 36, 38, 39, 40, 42, 44, 46, 48, 49, 50, 52, 54, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 76, 77, 78, 80, 82, 84, 86, 87, 88, 90, 91, 92, 94, 95, 96, 98, 100, 102, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2020

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.

Examples

			The sequence of terms together with their prime indices of prime indices begins:
   4: {{},{}}
   6: {{},{1}}
   8: {{},{},{}}
  10: {{},{2}}
  12: {{},{},{1}}
  14: {{},{1,1}}
  16: {{},{},{},{}}
  18: {{},{1},{1}}
  20: {{},{},{2}}
  21: {{1},{1,1}}
  22: {{},{3}}
  24: {{},{},{},{1}}
  26: {{},{1,2}}
  28: {{},{},{1,1}}
  30: {{},{1},{2}}
  32: {{},{},{},{},{}}
  34: {{},{4}}
  35: {{2},{1,1}}
  36: {{},{},{1},{1}}
  38: {{},{1,1,1}}
		

Crossrefs

Complement in A330945 of A000040.
Complement in A018252 of A076610.
The restriction to odd terms is A330949.
Nonprime numbers n such that A330944(n) > 0.
Taking odds instead of nonprimes gives A330946.
The number of prime prime indices is given by A257994.
Primes of prime index are A006450.
Primes of nonprime index are A007821.
Products of primes of nonprime index are A320628.
The set S of numbers whose prime indices do not all belong to S is A324694.

Programs

  • Mathematica
    Select[Range[100],!PrimeQ[#]&&!And@@PrimeQ/@PrimePi/@First/@If[#==1,{},FactorInteger[#]]&]

A372885 Prime numbers whose binary indices (positions of ones in reversed binary expansion) sum to another prime number.

Original entry on oeis.org

2, 3, 11, 23, 29, 41, 43, 61, 71, 79, 89, 101, 103, 113, 131, 137, 149, 151, 163, 181, 191, 197, 211, 239, 269, 271, 281, 293, 307, 331, 349, 353, 373, 383, 401, 433, 457, 491, 503, 509, 523, 541, 547, 593, 641, 683, 701, 709, 743, 751, 761, 773, 827, 863, 887
Offset: 1

Views

Author

Gus Wiseman, May 19 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
The indices of these primes are A372886.

Examples

			The binary indices of 89 are {1,4,5,7}, with sum 17, which is prime, so 89 is in the sequence.
The terms together with their binary expansions and binary indices begin:
    2:         10 ~ {2}
    3:         11 ~ {1,2}
   11:       1011 ~ {1,2,4}
   23:      10111 ~ {1,2,3,5}
   29:      11101 ~ {1,3,4,5}
   41:     101001 ~ {1,4,6}
   43:     101011 ~ {1,2,4,6}
   61:     111101 ~ {1,3,4,5,6}
   71:    1000111 ~ {1,2,3,7}
   79:    1001111 ~ {1,2,3,4,7}
   89:    1011001 ~ {1,4,5,7}
  101:    1100101 ~ {1,3,6,7}
  103:    1100111 ~ {1,2,3,6,7}
  113:    1110001 ~ {1,5,6,7}
  131:   10000011 ~ {1,2,8}
  137:   10001001 ~ {1,4,8}
  149:   10010101 ~ {1,3,5,8}
  151:   10010111 ~ {1,2,3,5,8}
  163:   10100011 ~ {1,2,6,8}
  181:   10110101 ~ {1,3,5,6,8}
  191:   10111111 ~ {1,2,3,4,5,6,8}
  197:   11000101 ~ {1,3,7,8}
		

Crossrefs

For prime instead of binary indices we have A006450, prime case of A316091.
Prime numbers p such that A029931(p) is also prime.
Prime case of A372689.
The indices of these primes are A372886.
A000040 lists the prime numbers, A014499 their binary indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A058698 counts partitions of prime numbers, strict A064688.
A372687 counts strict partitions of prime binary rank, counted by A372851.
A372688 counts partitions of prime binary rank, with Heinz numbers A277319.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Maple
    filter:= proc(p)
      local L,i,t;
      L:= convert(p,base,2);
      isprime(add(i*L[i],i=1..nops(L)))
    end proc:
    select(filter, [seq(ithprime(i),i=1..200)]); # Robert Israel, Jun 19 2025
  • Mathematica
    Select[Range[100],PrimeQ[#] && PrimeQ[Total[First/@Position[Reverse[IntegerDigits[#,2]],1]]]&]
Previous Showing 61-70 of 270 results. Next