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-10 of 13 results. Next

A001146 a(n) = 2^(2^n).

Original entry on oeis.org

2, 4, 16, 256, 65536, 4294967296, 18446744073709551616, 340282366920938463463374607431768211456, 115792089237316195423570985008687907853269984665640564039457584007913129639936
Offset: 0

Views

Author

Keywords

Comments

Or, write previous term in base 2, read in base 4.
a(1) = 2, a(n) = smallest power of 2 which does not divide the product of all previous terms.
Number of truth tables generated by Boolean expressions of n variables. - C. Bradford Barber (bradb(AT)shore.net), Dec 27 2005
From Ross Drewe, Feb 13 2008: (Start)
Or, number of distinct n-ary operators in a binary logic. The total number of n-ary operators in a k-valued logic is T = k^(k^n), i.e., if S is a set of k elements, there are T ways of mapping an ordered subset of n elements from S to an element of S. Some operators are "degenerate": the operator has arity p, if only p of the n input values influence the output. Therefore the set of operators can be partitioned into n+1 disjoint subsets representing arities from 0 to n.
For n = 2, k = 2 gives the familiar Boolean operators or functions, C = F(A,B). There are 2^2^2 = 16 operators, composed of: arity 0: 2 operators (C = 0 or 1), arity 1: 4 operators (C = A, B, not(A), not(B)), arity 2: 10 operators (including well-known pairs AND/NAND, OR/NOR, XOR/EQ). (End)
From José María Grau Ribas, Jan 19 2012: (Start)
Or, numbers that can be formed using the number 2, the power operator (^), and parenthesis. (End) [The paper by Guy and Selfridge (see also A003018) shows that this is the same as the current sequence. - N. J. A. Sloane, Jan 21 2012]
a(n) is the highest value k such that A173419(k) = n+1. - Charles R Greathouse IV, Oct 03 2012
Let b(0) = 8 and b(n+1) = the smallest number not in the sequence such that b(n+1) - Product_{i=0..n} b(i) divides b(n+1)*Product_{i=0..n} b(i). Then b(n) = a(n) for n > 0. - Derek Orr, Jan 15 2015
Twice the number of distinct minimal toss sequences of a coin to obtain all sequences of length n, which is 2^(2^n-1). This derives from the 2^n ways to cut each of the de Bruijn sequences B(2,n). - Maurizio De Leo, Feb 28 2015
I conjecture that { a(n) ; n>1 } are the numbers such that n^4-1 divides 2^n-1, intersection of A247219 and A247165. - M. F. Hasler, Jul 25 2015
Erdős has shown that it is an irrationality sequence (see Guy reference). - Stefano Spezia, Oct 13 2024

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E24.
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.1, p. 79.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

a(n+1) = (a(n))^2.
1 = Sum_{n>=0} a(n)/A051179(n+1) = 2/3 + 4/15 + 16/255 + 256/65535, ..., with partial sums: 2/3, 14/15, 254/255, 65534/65535, ... - Gary W. Adamson, Jun 15 2003
a(n) = A000079(A000079(n)). - Robert Israel, Jan 15 2015
Sum_{n>=0} 1/a(n) = A007404. - Amiram Eldar, Oct 14 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = 2.
Product_{n>=0} (1 - 1/a(n)) = A215016. (End)

A050150 Odd numbers with prime number of divisors.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Jason Earls, Jul 04 2001

Keywords

Comments

Here but not in A062090: [729, 15625, 59049, 117649, 531441]; in A062090 but not here: [1, 6561, 390625]. - Klaus Brockhaus, Nov 01 2001

Examples

			Numbers of the form p^6 for example (such as 3^6 = 729) are here but not in A062090.
		

Crossrefs

Cf. A062090 (a different sequence).

Programs

  • Haskell
    a050150 n = a050150_list !! (n-1)
    a050150_list = filter ((== 1) . a010051 . (+ 1) . a100995) [1, 3 ..]
    -- Reinhard Zumkeller, Aug 16 2013
    
  • Mathematica
    Select[ Range[1, 250, 2], PrimeQ[ Length[ Divisors[ # ]]] & ]
    Select[Range[1,799,2],PrimeQ[DivisorSigma[0,#]]&] (* Harvey P. Dale, Jun 22 2011 *)
  • PARI
    forstep(n=1,1000,2, if(isprime(numdiv(n)),print1(n,",")))
    
  • PARI
    is(n)=n%2 && isprime(isprimepower(n)+1) \\ Charles R Greathouse IV, Aug 28 2013
    
  • Python
    from sympy import divisor_count, isprime
    def ok(n): return n and n%2 and isprime(divisor_count(n))
    print([k for k in range(250) if ok(k)]) # Michael S. Branicky, Jul 05 2022

Formula

Numbers of the form p^e where p is an odd prime and e+1 is a prime.
A010051(A100995(a(n)) + 1) = 1. - Reinhard Zumkeller, Aug 16 2013
a(n) ~ n log n. - Charles R Greathouse IV, Aug 28 2013

Extensions

More terms from Jud McCranie, Oct 31 2001

A235479 Primes whose base-2 representation also is the base-9 representation of a prime.

Original entry on oeis.org

11, 13, 19, 41, 79, 109, 137, 151, 167, 191, 193, 199, 227, 239, 271, 307, 313, 421, 431, 433, 457, 487, 491, 521, 563, 613, 617, 659, 677, 709, 727, 757, 929, 947, 1009, 1033, 1051, 1249, 1483, 1693, 1697, 1709, 1721, 1831, 1951, 1979, 1987, 1993
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
A subsequence of A027697, A050150, A062090 and A176620.

Examples

			11 = 1011_2 and 1011_9 = 6571 are both prime, so 11 is a term.
		

Crossrefs

Cf. A235466A077723, A235266, A152079, A235475 - A235478, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • PARI
    is(p,b=9)=isprime(vector(#d=binary(p),i,b^(#d-i))*d~)&&isprime(p)

A062091 a(1) = 2, a(n)= smallest even number which does not divide the product of all previous terms.

Original entry on oeis.org

2, 4, 6, 10, 14, 18, 22, 26, 34, 38, 46, 50, 58, 62, 74, 82, 86, 94, 98, 106, 118, 122, 134, 142, 146, 158, 162, 166, 178, 194, 202, 206, 214, 218, 226, 242, 254, 262, 274, 278, 298, 302, 314, 326, 334, 338, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454
Offset: 1

Views

Author

Amarnath Murthy, Jun 16 2001

Keywords

Examples

			After 10 the next term in the sequence is 14 (not 12) as 12 = 2*6 divides the product of all the previous terms.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {2}, k = 4, P = 1}, Do[Set[P, P*a[[-1]]]; While[Mod[P, k] == 0, k += 2]; AppendTo[a, k], {i, 2, 56}]; a] (* Michael De Vlieger, Nov 04 2020 *)

Formula

2 and 4 together with numbers of the form 2*{p^(2^k)} where p is an odd prime and k is a nonnegative integer. [Corrected by Peter Munn, Nov 03 2020]
Conjecture: a(n) = 2*A062090(n-1) for n>=3. - R. J. Mathar, Jul 08 2025

Extensions

More terms from Dean Hickerson, Jul 10 2001

A235478 Primes whose base-2 representation also is the base-8 representation of a prime.

Original entry on oeis.org

7, 11, 13, 29, 37, 43, 47, 53, 61, 67, 71, 73, 107, 139, 149, 199, 211, 227, 263, 293, 307, 311, 317, 331, 347, 383, 389, 421, 461, 467, 541, 593, 601, 619, 641, 643, 739, 811, 863, 907, 937, 1061, 1069, 1093, 1117, 1163, 1223, 1283, 1301, 1319, 1321, 1409, 1433, 1439, 1489, 1499, 1523, 1559, 1619, 1697, 1811, 1861, 1879
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
Appears to be a subsequence of A050150, A062090 and A216285.

Examples

			11 = 1011_2 and 1011_8 = 521 are both prime, so 11 is a term.
		

Crossrefs

Cf. A235465A077722, A235266, A152079, A235475 - A235479, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,2],8]]&] (* Harvey P. Dale, Sep 25 2015 *)
  • PARI
    is(p,b=8)=isprime(vector(#d=binary(p),i,b^(#d-i))*d~)&&isprime(p)

A336882 a(0) = 1; for k >= 0, 0 <= i < 2^k, a(2^k + i) = m_k * a(i), where m_k is the least odd number not in terms 0..2^k - 1.

Original entry on oeis.org

1, 3, 5, 15, 7, 21, 35, 105, 9, 27, 45, 135, 63, 189, 315, 945, 11, 33, 55, 165, 77, 231, 385, 1155, 99, 297, 495, 1485, 693, 2079, 3465, 10395, 13, 39, 65, 195, 91, 273, 455, 1365, 117, 351, 585, 1755, 819, 2457, 4095, 12285, 143, 429, 715, 2145, 1001
Offset: 0

Views

Author

Peter Munn, Aug 16 2020

Keywords

Comments

A permutation of the odd numbers.
Every positive integer, m, is the product of a unique subset of the terms of A050376. The members of the subset are often known as the Fermi-Dirac factors of m. In this sequence, the odd numbers appear lexicographically according to their Fermi-Dirac factors (with those factors listed in decreasing order). The equivalent sequence for all positive integers is A052330.
The sequence has a conditional exponential identity shown in the formula section. This relies on the offset being 0, as in related sequences, notably A019565 and A052330.

Examples

			a(0) = 1, as specified explicitly.
m_0 = 3, the least odd number not in terms 0..0.
So a(1) = a(2^0 + 0) = m_0 * a(0) = 3 * 1 = 3.
m_1 = 5, the least odd number not in terms 0..1.
So a(2) = a(2^1 + 0) = m_1 * a(0) = 5 * 1 = 5;
and a(3) = a(2^1 + 1) = m_1 * a(1) = 5 * 3 = 15.
The initial terms are tabulated below, equated with the product of their Fermi-Dirac factors to exhibit the lexicographic order. We start with 1, since 1 is factored as the empty product and the empty list is first in lexicographic order.
   n     a(n)
   0    1,
   1    3 = 3,
   2    5 = 5,
   3   15 = 5 * 3,
   4    7 = 7,
   5   21 = 7 * 3,
   6   35 = 7 * 5,
   7  105 = 7 * 5 * 3,
   8    9 = 9,
   9   27 = 9 * 3,
  10   45 = 9 * 5,
  11  135 = 9 * 5 * 3,
  12   63 = 9 * 7.
		

Crossrefs

Permutation of A005408.
Subsequence of A052330.
Subsequences: A062090, A332382 (squarefree terms).
A003986, A003987, A004198, A059896, A059897 are used to express relationship between terms of this sequence.

Formula

a(2^k) = min({ 2*m+1 : m >= 0, 2*m+1 <> a(j), 0 <= j < 2^k }) = A062090(k+2).
If x AND y = 0, a(x+y) = a(x) * a(y), where AND denotes the bitwise operation, A004198(.,.).
a(x XOR y) = A059897(a(x), a(y)), where XOR denotes bitwise exclusive-or, A003987(.,.).
a(x OR y) = A059896(a(x), a(y)), where OR denotes the bitwise operation, A003986(.,.).

A235467 Primes whose base-4 representation also is the base-3 representation of a prime.

Original entry on oeis.org

2, 89, 137, 149, 281, 293, 353, 389, 409, 421, 593, 613, 661, 1097, 1109, 1289, 1301, 1321, 1381, 1409, 1601, 1609, 1669, 2069, 2129, 2309, 2377, 2389, 2729, 4133, 4229, 4373, 4441, 4513, 4673, 5153
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of the two-dimensional array of sequences based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
This is a subsequence of A002144, A002313, A003655, A050150, A062090, A141293, A175768, A192592, A226181 (conjectural).

Examples

			E.g., 89 = 1121_4 and 1121_3 = 43 both are prime.
		

Crossrefs

Cf. A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    b4b3Q[n_]:=Module[{b4=IntegerDigits[n,4]},Max[b4]<3&&PrimeQ[ FromDigits[ b4,3]]]; Select[Prime[Range[700]],b4b3Q] (* Harvey P. Dale, Dec 14 2021 *)
  • PARI
    is(p,b=3,c=4)=vecmax(d=digits(p,c))
    				
  • PARI
    forprime(p=1,1e3,is(p,4,3)&&print1(vector(#d=digits(p,3),i,4^(#d-i))*d~,",")) \\ To produce the terms, this is more efficient than to select them using straightforwardly is(.)=is(.,3,4)

A335427 a(1) = 0; for k >= 2, a(prime(k)) = 0, a(k^2) = 2 * a(k); otherwise a(n) = a(A334870(n)) + 1.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 4, 0, 1, 2, 4, 0, 1, 0, 6, 2, 1, 0, 5, 0, 1, 2, 10, 0, 3, 0, 5, 2, 1, 4, 2, 0, 1, 2, 7, 0, 3, 0, 18, 4, 1, 0, 6, 0, 1, 2, 34, 0, 3, 4, 11, 2, 1, 0, 8, 0, 1, 8, 6, 4, 3, 0, 66, 2, 5, 0, 3, 0, 1, 2, 130, 8, 3, 0, 8, 0, 1, 0, 12, 4, 1, 2, 19, 0, 5, 8, 258, 2, 1, 4, 7, 0, 1, 16, 2, 0, 3, 0, 35, 6
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Jun 15 2020

Keywords

Crossrefs

A052126, A225546, A334870, A335426 are used in formulas defining this sequence.
Related fully additive sequence: A048675.
Cf. A062090 (indices of zeros), A003159 (indices of even values), A036554 (indices of odd values).
A003961, A019565 are used to express relationship between terms of this sequence.

Programs

  • PARI
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
    A335427(n) = if(n<=2,n-1, if(isprime(n), 0, if(issquare(n), 2*A335427(sqrtint(n)), 1+A335427(A334870(n)))));
    
  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A052126(n) = if(1==n,n,(n/vecmax(factor(n)[, 1])));
    A335427(n) = if(n<=2,n-1, if(issquarefree(n), A048675(A052126(n)), my(k=core(n)); A048675(k) + 2*A335427(sqrtint(n/k))));

Formula

Alternative definition: (Start)
a(1) = 0, a(2) = 1; otherwise for n = k * m^2, k squarefree:
if m = 1, a(n) = A048675(A052126(k));
if m > 1, a(n) = A048675(k) + 2 * a(m).
(End)
For n = 4 * A122132(k), a(n) = A048675(n).
More generally, a(n) = A048675(n) if and only if n is in A335738.
a(n) = A335426(A225546(n)).
a(A003961(2k+1)) = 2 * a(2k+1).
If n is in A036554, a(n) = a(n/2) + 1; otherwise for n <> 3, a(n) = 2 * a(A019565(k/2) * m^2) - a(m^2), where n = A019565(k) * m^2.

A080429 Odd numbers such that all a(i)*a(j) with i

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 105, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Amarnath Murthy, Feb 20 2003

Keywords

Examples

			49 belongs to this sequence but 45 does not as 45*1 = 9*5.
		

Crossrefs

Distinct from A062090.

Programs

  • Maple
    S := {3}: A := array(1..10^3): for m from 1 to 10^3 do A[m] := 0 od: A[1] := 1: A[3] := 3: for n from 5 to 10^3-1 by 2 do mytest := 0: for j from 1 to n-2 by 2 do if A[j]>0 then if member(A[j]*n, S) then mytest := 1; break; fi:fi:od: if mytest=0 then A[n] := n; for j from 1 to n-2 by 2 do S := S union {A[j]*n} od: fi: od: for i from 1 to 10^3-1 by 2 do if A[i]>0 then printf(`%d,`, A[i]) fi: od: # James Sellers, Feb 25 2003

Extensions

More terms from James Sellers, Feb 25 2003

A155186 Primes in A155171.

Original entry on oeis.org

2, 7, 29, 101, 107, 197, 227, 457, 647, 829, 1549, 1627, 2221, 2309, 2347, 2521, 2677, 2801, 3181, 3299, 3529, 3541, 3557, 3739, 3769, 4231, 4549, 4871, 4987, 5651, 5827, 5881, 6037, 6079, 6637, 6827, 7517, 7639, 7937, 9787, 11621, 12041, 12329, 13009
Offset: 1

Views

Author

Keywords

Comments

Numbers p (prime numbers only) of primitive Pythagorean triangles such that perimeters are Averages of twin prime pairs, q=p+1, a=q^2-p^2, c=q^2+p^2, b=2*p*q, s=a+b+c, s-+1 are primes.

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;ar=a*b/2;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],If[PrimeQ[p],AppendTo[lst,p]]],{n,8!}];lst
Showing 1-10 of 13 results. Next