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

A027763 Smallest k such that 2^^n is not congruent to 2^^(n-1) mod k, where 2^^n denotes the power tower 2^2^...^2 (in which 2 appears n times).

Original entry on oeis.org

2, 3, 5, 11, 23, 47, 283, 719, 1439, 2879, 34549, 138197, 531441, 1594323, 4782969, 14348907, 43046721, 86093443, 344373773, 688747547, 3486784401
Offset: 1

Views

Author

Keywords

Comments

This sequence shares many terms with A056637, the least prime of class n-. Note that 3^(n-1) is an upper bound for each term and the upper bound is reached for n=13 and n=14. Are all subsequent terms 3^(n-1)? The Mathematica code uses the TowerMod function in the CNT package, which is described in the book by Bressoud and Wagon. - T. D. Noe, Mar 13 2009
For n=15, n=16, and n=17, the terms are also of the form 3^(n-1), but for n=18 and n=19, the terms are prime. - Wayne VanWeerthuizen, Aug 26 2014
A185816(a(n)) = n. - Reinhard Zumkeller, Sep 02 2014
Prime terms seen up to n=20 are in eleven instances of the form j*a(n-1)+1, for j=2, 4, 6, or 12. Note, though, that a(2)=5 and a(8)=719 are exceptions to this pattern. - Wayne VanWeerthuizen, Sep 06 2014

Examples

			2^^2=2^2=4 and 2^^3=2^2^2=16. We find 4 = 16 (mod k) until k=5. So a(3)=5. - _T. D. Noe_, Mar 13 2009
		

References

  • David Bressoud and Stan Wagon, A Course in Computational Number Theory, Key College Pub., 2000, p. 96.
  • Stan Wagon, posting to Problem of the Week mailing list, Dec 15 1997.

Crossrefs

Programs

  • Mathematica
    Needs["CNT`"]; k=1; Table[While[TowerMod[2,n,k]==TowerMod[2,n-1,k], k++ ]; k, {n,10}] (* T. D. Noe, Mar 13 2009 *)

Extensions

Improved the name and changed the offset because I just prepended a term. - T. D. Noe, Mar 13 2009
Corrected and extended by T. D. Noe, Mar 13 2009
Terms a(15)-a(19) from Wayne VanWeerthuizen, Aug 26 2014
Terms a(20)-a(21) from Wayne VanWeerthuizen, Sep 06 2014

A185816 Number of iterations of lambda(n) needed to reach 1.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Feb 05 2011

Keywords

Comments

lambda(n) is the Carmichael lambda function, A002322.
a(n) = (length of row n in table A246700) - 1. - Reinhard Zumkeller, Sep 02 2014

Examples

			If n = 23 the trajectory is 23, 22, 10, 4, 2, 1. Its length is 6, thus a(23) = 5.
		

Crossrefs

Programs

  • Haskell
    a185816 n = if n == 1 then 0 else a185816 (a002322 n) + 1
    -- Reinhard Zumkeller, Sep 02 2014
  • Maple
    a:= n-> `if`(n=1, 0, 1+a(numtheory[lambda](n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 27 2019
  • Mathematica
    f[n_] := Length[ NestWhileList[ CarmichaelLambda, n, Unequal, 2]] - 2; Table[f[n], {n, 1, 120}]

Formula

For n > 1: a(n) = a(A002322(n)) + 1. - Reinhard Zumkeller, Sep 02 2014

A256758 Position of first appearance of n in A256757.

Original entry on oeis.org

1, 2, 3, 7, 19, 47, 163, 487, 1307, 2879, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 86093443, 344373773, 688747547, 3486784401
Offset: 0

Views

Author

Ivan Neretin, Apr 09 2015

Keywords

Comments

Smallest number m such that the trajectory of m under iteration of A007733 takes n steps to reach the fixed point.
The terms a(1)..a(9) are primes. The next eight terms are powers of 3, so that for n=10..17, a(n)=3^(n-1), but this apparently established pattern breaks at a(18), which is again a prime.

Crossrefs

Cf. A007733, A007755 (similarly built upon the totient function), A173927 (similarly built upon the Carmichael lambda function), A256757.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a256758 = (+ 1) . fromJust . (`elemIndex`  a256757_list)
    -- Reinhard Zumkeller, Apr 13 2015
  • Mathematica
    A007733 = Function[n, MultiplicativeOrder[2, n/(2^IntegerExponent[n, 2])]];
    A256757 = Function[n, k = 0; m = n; While[m > 1, m = A007733[m]; k++]; k];
    a = Function[n, t = 1; While[A256757[t] < n , t++]; t]; Table[a[n], {n, 0, 9}] (* Ivan Neretin, Apr 13 2015 *)
  • PARI
    a007733(n) = znorder(Mod(2, n/2^valuation(n, 2)));
    a256757(n) = {if (n==1, return(0)); nb = 1; while((n = a007733(n)) != 1, nb++); nb; }
    a(n) = {k = 1; while(a256757(k) != n, k++); k;} \\ Michel Marcus, Apr 11 2015
    

Extensions

a(15)-a(18) from Michel Marcus, Apr 11 2015
a(19)-a(21) from Amiram Eldar, Mar 04 2023
Showing 1-3 of 3 results.