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

A174414 a(n) is the smallest natural number k such that the concatenation (n+k)||k is a prime number.

Original entry on oeis.org

3, 1, 1, 3, 1, 1, 3, 3, 1, 9, 19, 1, 3, 1, 7, 3, 1, 1, 3, 1, 13, 17, 1, 1, 3, 1, 1, 3, 7, 1, 9, 1, 23, 3, 3, 19, 17, 7, 1, 3, 1, 1, 3, 21, 1, 11, 3, 1, 3, 7, 1, 9, 1, 7, 21, 1, 7, 3, 1, 7, 3, 1, 1, 3, 1, 17, 9, 1, 1, 3, 3, 7, 9, 1, 1, 9, 13, 7, 3, 1, 1, 3, 3, 11, 3, 7, 1, 27, 7, 1, 9, 3, 1, 9, 3, 1, 9, 1
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 19 2010

Keywords

Comments

The last digit of a(n) must be 1, 3, 7 or 9.
If n and 10^d+1 are not coprime, then a(n) cannot have d digits. - Robert Israel, Sep 16 2024

Examples

			43 = prime(14) = (3+1)||3, a(1) = 3
31 = prime(11) = (1+2)||1, a(2) = 1
41 = prime(13) = (1+3)||1, a(3) = 1
3413 = prime(480) = (13+21)||13, a(21) = 13
11527 = prime(1390) = (27+88)||27, a(88) = 27
Note cases where consecutive values of n give consecutive primes:
n=17: 181 = prime(42) = (1+17)||1, n=18: 191 = prime(43) = (1+18)||1
k=41: 421 = prime(82) = (1+41)||1, n=42: 431 = prime(83) = (1+42)||1
... are there infinitely many of such?
a(11) = 19, 3019 is a resulting "candidate" for n = 301 - 9 = 292, but a(292) = 3 gives 2953 = prime(425)
First twice resulting prime is 5623 = prime(739) = (23+33)||23 = 5623 = (559+3)||3
		

References

  • Theo Kempermann, Zahlentheoretische Kostproben, Harri Deutsch, 2. aktualisierte Auflage 2005.
  • Helmut Kracke, Mathe-musische Knobelisken, Dümmler Bonn, 2. Auflage 1983.
  • Hugo Steinhaus, Studentenfutter, Urania-Verlag Leipzig-Jena-Berlin, 1991.

Crossrefs

Programs

  • Maple
    tcat:= proc(a,b) a*10^(1+ilog10(b))+b end proc:
    f:= proc(n) local k, d;
        for d from 1 do
          if igcd(n, 10^d+1) > 1 then next fi;
          for k from 10^(d-1)+`if`(d=1, 0, 1) to 10^d by 2 do
            if isprime(tcat(n+k, k)) then return k fi
        od od
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 16 2024
  • PARI
    a(n) = my(k=1); while (!isprime(eval(concat(Str(n+k), Str(k)))), k++); k; \\ Michel Marcus, Sep 17 2024
    
  • Python
    from itertools import count
    from math import gcd
    from sympy import isprime
    def A174414(n):
        for l in count(1):
            if gcd(n,(m:=10**l)+1)==1:
                r = m//10
                a = m*(n+r)+r
                for k in range(r,m):
                    if isprime(a):
                        return k
                    a += m+1 # Chai Wah Wu, Sep 18 2024

Formula

a(n) = 1 for n > 1 in A126785.

Extensions

Edited and corrected by Robert Israel, Sep 16 2024

A174034 The smallest prime p such that the double-concatenation prime(n) // prime(n+1) // p is a prime number.

Original entry on oeis.org

3, 3, 7, 19, 17, 7, 17, 7, 3, 23, 11, 11, 11, 17, 3, 3, 7, 3, 11, 17, 29, 19, 13, 7, 37, 7, 23, 37, 7, 23, 7, 7, 7, 11, 7, 53, 29, 31, 31, 13, 11, 17, 7, 11, 11, 29, 23, 47, 7, 7, 7, 13, 11, 19, 67, 19, 13, 101, 59, 13, 13, 31, 17, 23, 7, 13, 29, 73, 29, 7
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Mar 06 2010

Keywords

Comments

It is conjectured that a(n) = 3 for infinitely many n.

Examples

			n=1: 2 // 3 // 3 = 233, which is prime, so a(1) = 3.
n=2: 3 // 5 // 2 = 352, which is not prime, but 3 // 5 // 3 = 353 is, so a(2) = 3.
		

Crossrefs

Programs

  • PARI
    A174034(n)={ n=eval(Str(prime(n),prime(n+1))); for( d=1,99, n*=10; forprime( p=10^(d-1),10^d, isprime(n+p) & return(p)))} \\ M. F. Hasler, Dec 01 2010
  • Sage
    concat = lambda xx: Integer(''.join(map(str,xx)))
    A174034 = lambda x: next((p for p in Primes() if is_prime(concat([nth_prime(x), nth_prime(x+1), p])))) # D. S. McNeil, Dec 02 2010
    

Extensions

Edited and terms checked by D. S. McNeil, Dec 01 2010

A174583 a(k) is the least n such that the concatenation (n - k)"n is a prime number, for k >= 0.

Original entry on oeis.org

1, 3, 3, 7, 7, 17, 7, 9, 9, 11, 13, 17, 13, 19, 17, 19, 21, 21, 23, 27, 27, 23, 43, 33, 41, 27, 27, 29, 31, 33, 31, 33, 39, 47, 37, 39, 37, 39, 39, 41, 51, 47, 47, 61, 47, 49, 49, 53, 49, 51, 51, 59, 57, 57, 61, 57, 57, 61, 63, 63, 71, 63, 63, 67, 67, 77, 67, 69, 77, 71, 73, 77
Offset: 0

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 23 2010

Keywords

Comments

See comments and references for A174414.
10^d*(n - k) + n has to be prime for the least d-digit n > k (k >= 0).
For (n - k)"n to be a prime, n must end in the digit 1, 3, 7, or 9.
Conjecture: a(k) = a(k+1) for an infinite number of k's.
As n > k, the number of a(k) is finite, and can be easily bounded from above.
1, 11, ... appear only once in the sequence; 3, 9, 13, 19, 21, 23, ... appear twice; 7, 17, ... three times; and so on.
Does each n that ends in the digit 1, 3, 7, or 9 appear in this sequence?
Note this interesting observation that first occurs for k = 84: 9291013 = prime(620602) = (1013 - 84)"1013, a(84) = 1013. A second example is: 9381037 = prime(626219) = (1037 - 99)"1037.
Let k be a multiple of 7, 11, or 13, then no 3-digit n exists such that (n - k)"n is prime. Proof: 10^3*(n - k) + n = n * (10^3+1) - k * 10^3 = 7 * 11 * 13 * n - k * 10^3 is not prime, as k is a multiple of 7, 11, or 13.
Similar for k-digit n with given divisors and k > 3: 10^4 + 1 = 73 * 137, 10^5 + 1 = 11 * 9091.

Examples

			11 = prime(5) = (1 - 0)"1, thus a(0) = 1.
23 = prime(9) = (3 - 1)"3, thus a(1) = 3.
13 = prime(6) = (3 - 2)"3, thus a(2) = 3.
139 = prime(34) = (39 - 38)"39, thus a(38) = 39.
9109 = prime(1130) = (109 - 100)"109, thus a(100) = 109.
		

Crossrefs

Programs

  • Maple
    mycat := (k, n) -> parse(cat(convert(n - k, string), convert(n, string))):
    sol := (k, n) -> isprime(mycat(k, n)):
    a := proc(k) local n; for n from k + 1 while not sol(k, n) do od; n end:
    seq(a(k), k = 0..71);  # Peter Luschny, Sep 20 2024

Extensions

Edited, offset set to 0 and a(71) corrected by Peter Luschny, Sep 20 2024

A174287 Smallest natural square base q = q(k) that concatenation prime(k)//prime(k+1)//q^2 (k = 1, 2, ...) is a prime number.

Original entry on oeis.org

3, 3, 1, 11, 1, 1, 1, 1, 1, 1, 3, 7, 31, 13, 9, 1, 1, 141, 53, 37, 9, 11, 1, 7, 61, 7, 17, 13, 17, 1, 17, 11, 7, 23, 7, 27, 27, 7, 1, 9, 19, 29, 7, 29, 19, 3, 3, 1, 43, 67, 1, 7, 7, 9, 9, 1, 13, 21, 7, 7, 7, 1, 1, 43, 1, 1, 57, 1, 67, 7, 17
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 15 2010

Keywords

Comments

Note two consecutive primes prime(k)//prime(k+1)
Necessarily q is odd and has end digit 1, 3, 7 or 9

Examples

			3^2=9, 239 = prime(52) => q(1) = 3
359 = prime(72) => q(2) = 3
k=18, prime(18) = 61, 141^2 = 19881, 616719881 = prime(32151650) => q(18) = 141
		

References

  • J.-P. Allouche, J. Shallit: Automatic Sequences, Theory, Applications, Generalizations, Cambridge University Press, 2003

Crossrefs

A174977 Natural numbers n = n(k) with property that string "2" appears k-times in concatenation Conc(1;n) := 1//2// ... //n (k, n = 1, 2, ...) or 0 if n(k) does not exist.

Original entry on oeis.org

2, 12, 20, 21, 0, 22, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92, 102, 112, 120, 121, 0, 122, 123, 124, 125, 126, 127, 128, 129, 132, 142, 152, 162, 172, 182, 192, 200, 201, 0, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 0, 212, 0, 220, 0, 221, 0, 0
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 03 2010

Keywords

Comments

If a natural n(k) is made of m > 1 digits "2" then (m-1) consecutive values of n(k) = 0, preceding this n(k)

Examples

			1//2, n(1) = 2
1//...//21, n(4) = 21
n(5) does not exist, 1//...//22, n(6) = 22
1//...//29, n(13) = 29
1//...//227, n(72) = 227
		

References

  • K. Haase, P. Mauksch: Spass mit Mathe, Urania-Verlag Leipzig, Verlag Dausien Hanau, 2. Auflage 1985
  • E. I. Ignatjew, Mathematische Spielereien, Urania Verlag Leipzig/Jena/Berlin 1982

Crossrefs

Showing 1-5 of 5 results.