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: Matthew House

Matthew House's wiki page.

Matthew House has authored 3 sequences.

A376801 a(0) = 397; a(n+1) = a(n)^2 if a(n) is prime, floor(a(n)/2) otherwise.

Original entry on oeis.org

397, 157609, 78804, 39402, 19701, 9850, 4925, 2462, 1231, 1515361, 757680, 378840, 189420, 94710, 47355, 23677, 560600329, 280300164, 140150082, 70075041, 35037520, 17518760, 8759380, 4379690, 2189845, 1094922, 547461, 273730, 136865, 68432, 34216, 17108, 8554
Offset: 0

Author

Matthew House, Oct 04 2024

Keywords

Comments

From most starting points, this sequence trivially reaches the cycle (4,2,4,2,...). No other cycles are known to exist. Heuristic results suggest that every starting point almost surely reaches a cycle, despite the colossal size of the intermediate values. a(0) = 397 is the first starting point which is not known to reach the (4,2) cycle: heuristically, the sequence likely runs for 10^12 terms or more before hitting it.

Examples

			The first few primes in the sequence are 397, 1231, 23677, 1069, 4463, and the value is squared after each of these. Otherwise, the value is halved.
		

Programs

  • Mathematica
    NestList[If[PrimeQ[#], #^2, Quotient[#, 2]] &, 397, 50]
  • Python
    from functools import lru_cache
    from sympy import isprime
    @lru_cache(maxsize=None)
    def A376801(n): return (a**2 if isprime(a:=A376801(n-1)) else a>>1) if n else 397 # Chai Wah Wu, Oct 25 2024

Formula

If a(n) is prime and a(n) >= 13, then a(n+6) = floor(a(n)^2/32).

A375965 Primes which can be turned into a different prime by exchanging two consecutive digits.

Original entry on oeis.org

13, 17, 31, 37, 71, 73, 79, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 163, 167, 173, 179, 181, 191, 193, 197, 199, 239, 241, 251, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 349, 373, 379, 389, 397, 401, 419, 421, 439, 457, 461, 463, 467, 491, 503
Offset: 1

Author

Matthew House, Sep 04 2024

Keywords

Comments

Heuristically, both this sequence and its complement should have positive density within the primes. Empirically, n/pi(a(n)) approaches ~0.75 for large n. But is this sequence even infinite?
Dickson's conjecture implies it is infinite, e.g. it implies that there are infinitely many primes ending in 13 for which changing the last two digits to 31 produces a prime. - Robert Israel, Sep 04 2024

Examples

			2, 3, 5, and 7 are excluded, since they have no two digits to exchange.
11 is excluded, since it yields only itself.
13 and 17 are included, since they yield the primes 31 and 71.
19, 23, and 29 are excluded, since they yield the composite numbers 91, 32, and 92.
		

Crossrefs

Subsequence of A225035.

Programs

  • Maple
    filter:= proc(n) local L,d,i;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10); d:= nops(L);
      for i from 1 to d-1 do
          if L[i] <> L[i+1] and isprime(n + (L[i]-L[i+1])*(10^i-10^(i-1))) then return true fi
      od;
      false
    end proc:
    select(filter, [seq(i,i=11 .. 1---,2)]); # Robert Israel, Sep 04 2024
  • Mathematica
    Select[Prime[Range[100]], With[{digits = IntegerDigits[#]}, AnyTrue[Complement[FromDigits[Permute[digits, Cycles[{{#, # + 1}}]]] & /@ Range[Length[digits] - 1], {#}], PrimeQ]] &]
  • Python
    from sympy import isprime
    def ok(n):
        if not isprime(n): return False
        s = str(n)
        for i in range(len(s)-1):
            t = int(s[:i]+s[i+1]+s[i]+s[i+2:])
            if t != n and isprime(t): return True
        return False
    print([k for k in range(504) if ok(k)]) # Michael S. Branicky, Sep 04 2024

A282279 Decimal expansion of minimal radius of a circle that contains 12 non-overlapping unit disks.

Original entry on oeis.org

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

Author

Matthew House, Feb 10 2017

Keywords

Examples

			4.029601930116183497482741041263349896...
		

Programs

  • Mathematica
    r = Root[#^5 - 3 #^4 + 7 #^2 - 15 # + 9 &, 3];
    N[1 + 2 r/Sqrt[3], 20]
  • PARI
    r = solve(x=2, 3, x^5 - 3*x^4 + 7*x^2 - 15*x + 9); 1 + 2*r/sqrt(3) \\ Michel Marcus, Feb 11 2017

Formula

Set r as the greatest real root of x^5 - 3*x^4 + 7*x^2 - 15*x + 9 = 0. Then, A = 1 + 2*r/sqrt(3) = 4.029601930...