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-9 of 9 results.

A364855 Initial digit of 3^(3^n) (A055777(n)).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Aug 10 2023

Keywords

Comments

This sequence corresponds to the initial digit of 3vvn (since 3^(3^n) = ((((3^3)^3)^...)^3) n-times), where vv indicates weak tetration (see links).
The author conjectures that the distribution of the initial digits of the present sequence obey Benford's law or Zipf's law (see links).
The corresponding final digit of 3^(3^n) is A010705(n) = 3 if n even or 7 if n odd.

Examples

			a(2) = 1, since 3^(3^2) = 3^9 = 19683.
		

References

  • A. Iorliam, Natural Laws (Benford's Law and Zipf's Law) For Network Traffic Analysis, In: Cybersecurity in Nigeria. SpringerBriefs in Cybersecurity. Springer, Cham (2019), 3-22. DOI: 10.1007/978-3-030-15210-9_2

Crossrefs

Cf. A000030, A010705 (last digit), A055777, A364789, A364837.

Programs

  • Mathematica
    Join[{3},Table[Floor[3^(3^n)/10^Floor[Log10[3^(3^n)]]],{n,16}]]

Formula

a(n) = floor(3^(3^n)/10^floor(log_10(3^(3^n)))).
a(n) = A000030(A055777(n)).

Extensions

More terms from Jinyuan Wang, Aug 11 2023

A129290 Base-3 Fermat numbers: 3^(3^n) + 1.

Original entry on oeis.org

4, 28, 19684, 7625597484988, 443426488243037769948249630619149892804, 87189642485960958202911070585860771696964072404731750085525219437990967093723439943475549906831683116791055225665628
Offset: 0

Views

Author

Alexander Adamchuk, Apr 08 2007

Keywords

Comments

Apparently discovered (with arbitrary base) by Gottschalk in 1938 and independently by Ferentinou-Nicolacopoulou in 1963. - Charles R Greathouse IV, Jul 05 2011
a(n) divides a(n+1). a(n+1)/a(n) = (3^(3^(n+1)) + 1)/(3^(3^n) + 1) = 1 - 3^(3^n) + 9^(3^n) = A002061(3^(3^n)) = A129291(n) = {7, 703, 387400807, 58149737003032434092905183, ...}.

References

  • J. Ferentinou-Nicolacopoulou, "Une propriété des diviseurs du nombre r^(r^m)+1. Applications au dernier théorème de Fermat." Bulletin Société Mathématique de Grèce 4:1 (1963), pp. 121-126.

Crossrefs

Cf. A000215 (Fermat numbers: 2^(2^n) + 1).
Cf. A055777 (3^(3^n)).
Cf. A129291 (A129290(n+1) / A129290(n)).
Cf. A002061 (central polygonal numbers: n^2 - n + 1).

Programs

Formula

a(n) = 3^(3^n) + 1. a(n) = A055777(n) + 1.

A137840 Number of distinct n-ary operators in a quaternary logic.

Original entry on oeis.org

4, 256, 4294967296, 340282366920938463463374607431768211456, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096
Offset: 0

Views

Author

Ross Drewe, Feb 13 2008

Keywords

Comments

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 taken 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.

Crossrefs

Cf. A001146 (in binary logic), A055777 (in a ternary logic), A137841 (in a quinternary logic).
Subsequence of A000302.

Formula

a(n) = 4^(4^n).

A140331 Smallest k such that 3^(3^n) - k is prime.

Original entry on oeis.org

1, 4, 2, 26, 10, 466, 506, 128, 13342, 5974, 8410, 6470
Offset: 0

Views

Author

Jonathan Vos Post, May 26 2008

Keywords

Comments

This is to 3 as A058220 is to 2.

Examples

			a(4) = 10 because 3^(3^4) - 10 = 443426488243037769948249630619149892793 is prime.
		

Crossrefs

Cf. A055777 (3^(3^n)), A058220.

Programs

  • PARI
    a(n) = x = 3^(3^n); x - precprime(x); \\ Michel Marcus, Jan 28 2015

Formula

a(n) = A064722(A055777(n)). - Michel Marcus, Jan 28 2015

Extensions

a(5)-a(8) from Cino Hilliard, Jun 02 2008
a(9)-a(10) from Donovan Johnson, Sep 13 2008
a(0) prepended and a(11) from Michael S. Branicky, Aug 23 2024

A336068 Numbers k such that the exponent of the highest power of 3 dividing k (A007949) is a divisor of k.

Original entry on oeis.org

3, 6, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 48, 51, 54, 57, 60, 66, 69, 72, 75, 78, 84, 87, 90, 93, 96, 102, 105, 108, 111, 114, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147, 150, 156, 159, 165, 168, 174, 177, 180, 183, 186, 189, 192, 195, 198, 201, 204
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2020

Keywords

Comments

All the terms are divisible by 3 by definition.
Šalát (1994) proved that the asymptotic density of this sequence is 0.287106... (A336069).

Examples

			3 is a term since A007949(3) = 1 is a divisor of 3.
		

Crossrefs

A055777 is a subsequence.

Programs

  • Mathematica
    Select[Range[200], Mod[#, 3] == 0 && Divisible[#, IntegerExponent[#, 3]] &]
  • PARI
    isok(m) = if (!(m%3), (m % valuation(m,3)) == 0); \\ Michel Marcus, Jul 08 2020

A383817 Decimal expansion of -Sum_{k>=1} mu(3*k)/(3^k - 1), where mu is the Möbius function A008683.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, May 11 2025

Keywords

Comments

The real root of the cubic polynomial 729*x^3 - 810*x^2 - 429*x + 233 matches this constant to 20 decimal places.

Examples

			0.3704211756339267984957431894112681...
		

Crossrefs

Programs

  • PARI
    sum(k=1,logint(2^getlocalbitprec(),3)+1,moebius(3*k)/(3.^k - 1),0.) \\ Bill Allombert

Formula

Equals Sum_{k>=0} 1/3^(3^k) = Sum_{k>=0} 1/A055777(k). - Amiram Eldar, May 11 2025

A137841 Number of distinct n-ary operators in a quinternary logic.

Original entry on oeis.org

5, 3125, 298023223876953125, 2350988701644575015937473074444491355637331113544175043017503412556834518909454345703125
Offset: 0

Views

Author

Ross Drewe, Feb 13 2008

Keywords

Comments

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 taken 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.

Crossrefs

Cf. A001146 (in binary logic), A055777 (in ternary logic), A137840 (in quaternary logic).
Subsequence of A000351.

Formula

a(n) = 5^(5^n).

A129291 a(n) = 1 - 3^(3^n) + 9^(3^n).

Original entry on oeis.org

7, 703, 387400807, 58149737003032434092905183, 196627050475552913618075908526912116282660024455971729157367165907347241304007
Offset: 0

Views

Author

Alexander Adamchuk, Apr 08 2007

Keywords

Comments

a(n) is the ratio of two consecutive base-3 Fermat numbers A129290(n) = 3^(3^n) + 1 = {4, 28, 19684, 7625597484988, ...}.

Crossrefs

Cf. A129290 (3^(3^n) + 1).
Cf. A055777 (3^(3^n)).
Cf. A002061 (central polygonal numbers: n^2 - n + 1).

Programs

  • Mathematica
    Table[1 - 3^3^n + 9^3^n, {n,0,5}]

Formula

a(n) = A002061(3^(3^n)). a(n) = A129290(n+1) / A129290(n).

A370578 Numbers k such that k + 1 divides 3^k + 1.

Original entry on oeis.org

0, 1, 3, 27, 531, 1035, 4635, 6363, 11475, 19683, 40131, 80955, 266475, 280755, 307395, 356643, 490371, 544347, 557955, 565515, 572715, 808227, 1256355, 1695483, 1959075, 1995075, 2771595, 2837835, 3004155, 3208491, 3337635, 3886443, 4670955, 5619411, 6434595, 6942817
Offset: 1

Views

Author

Akiva Weinberger, Feb 22 2024

Keywords

Comments

The sequence is infinite. It contains all numbers of the form 3^(3^m).
After 3, the smallest term that is not a multiple of 9 is a(13) = 266475.
After 1, the smallest term that is not a multiple of 3 is a(36) = 6942817.
After 1, the smallest term that is not 3 (mod 8) is, also, a(36) = 6942817.
No term can be 2 (mod 3). Proof: Otherwise, k + 1 would be a multiple of 3 while 3^k + 1 would not.
All terms after 0 are odd. Proof: Suppose k is even, so that k+1 is odd. Let p be a prime factor of k+1. Then (by definition of k) 3^k == -1 (mod p) and 3^(2k) == 1 (mod p), so the order of 3 (mod p) divides 2k but not k. Thus the order of 3 is a multiple of 2^(v_2(k)+1) where v_2(k) = A007814(k) is the exponent of 2 in the prime factorization of k. But 3^(p-1) == 1 (mod p) by Fermat's little theorem, so p == 1 (mod 2^(v_2(k)+1)). Multiplying this for all prime factors p of k+1 gives k+1 == 1 (mod 2^(v_2(k)+1)), or k == 0 (mod 2^(v_2(k)+1)). But this contradicts the definition of v_2.
Apart from 0, the only possible residues mod 72 are 1, 3, 13, 25, 27, 37, 49, 51, and 61. It is conjectured that all appear eventually. (See John Omielan's answer to the author's question on Mathematics Stack Exchange.)
Empirically, approximately 80% of the terms are 27 (mod 72).

Examples

			(3^27+1)/(27+1) is an integer, so 27 is in the sequence. This can be shown efficiently using a modular exponentiation algorithm to find 3^27 mod 28.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,7000000],TrueQ[PowerMod[3,#,#+1]==#]&] (* James C. McMahon, Feb 25 2024 *)
  • Python
    for n in range(100_000_000):
      if (pow(3,n,n+1)==n):
        print(n)
Showing 1-9 of 9 results.