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.

Previous Showing 11-13 of 13 results.

A341932 a(n) = largest k < n such that the decimal concatenation n||n-1||n-2||...||n-k is prime, or -1 if no such prime exists.

Original entry on oeis.org

-1, -1, 0, 0, 1, 0, -1, 4, -1, -1, 3, 0, -1, 0, -1, -1, -1, 0, -1, 0, -1, -1, 3, 0, 1, 12, -1, 4, -1, 0, -1, 0, -1, -1, 1, -1, -1, 0, -1, -1, -1, 0, 1, 0, -1, -1, 43, 0, 31, -1, -1, 4, 15, 12, -1, 28, 9, -1, 1, 0, 13, 0, -1, -1, -1, -1, -1, 0, 57, -1, 1, 0, -1
Offset: 0

Views

Author

Chai Wah Wu, Feb 23 2021

Keywords

Comments

a(82) = 81, are there any other n such that a(n) = n-1?
Primes p such that a(p) > 0: 7, 53, 73, 79, 89, 103, ...
n such that a(n) > A341702(n): 7, 10, 22, 46, 48, 53, 55, 73, ...
Similar argument as in A341716 shows that if n > 3 and a(n) >= 0, then n-a(n) is odd, a(n) !== 2 (mod 3) and 2n-a(n) !== 0 (mod 3).

Examples

			a(22) = 3 since 22212019 is prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    def A341932(n):
        k, m, r = n, n-1, 0 if isprime(n) else -1
        while m > 0:
            k = int(str(k)+str(m))
            if isprime(k):
                r = n-m
            m -= 1
        return r

Formula

a(n) = n-A341931(n) >= A341702(n).

A085720 Start of a run of 7 successive numbers which when concatenated form a prime.

Original entry on oeis.org

7, 37, 157, 185, 187, 271, 301, 355, 475, 485, 523, 533, 577, 611, 653, 661, 667, 731, 733, 755, 761, 791, 853, 911, 913, 937, 983, 1085, 1111, 1187, 1205, 1253, 1397, 1417, 1585, 1631, 1655, 1685, 1697, 1711, 1723, 1841, 1907, 1975, 2035, 2077, 2105, 2185
Offset: 1

Views

Author

Zak Seidov, Jun 27 2003

Keywords

Comments

Concatenation of three and six successive numbers are always composite.
Primes as concatenation of two, four and five successive numbers are in A030458, A030471, A052087, A052088, A052089.

Crossrefs

Programs

  • Mathematica
    f[n_] := FromDigits[ Flatten[ Table[ IntegerDigits[i], {i, n, n + 6}]]]; Select[ Range[2190], PrimeQ[ f[ # ]] & ]
    Select[Range[2500],PrimeQ[FromDigits[Flatten[IntegerDigits/@Range[#,#+6]]]]&] (* Harvey P. Dale, Aug 15 2021 *)

Extensions

Edited by Robert G. Wilson v, Jun 28 2003
Edited by Charles R Greathouse IV, Apr 24 2010

A317744 Prime numbers which result as a concatenation of a decimal number and its binary representation.

Original entry on oeis.org

11, 311, 5101, 131101, 2511001, 37100101, 51110011, 59111011, 731001001, 931011101, 971100001, 1191110111, 12910000001, 13110000011, 13710001001, 15310011001, 17310101101, 19311000001, 21311010101, 21511010111, 24711110111, 25511111111, 319100111111
Offset: 1

Views

Author

Philip Mizzi, Aug 05 2018

Keywords

Comments

The decimal number plus its Hamming weight A000120 must not be divisible by 3. - M. F. Hasler, Apr 05 2024

Examples

			11 is in the sequence because the binary representation of 1 is 1 and the concatenation of 1 and 1 gives 11, which is prime.
931011101 is in the sequence because it is the concatenation of 93 and 1011101 (the binary representation of 93) and is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits[Join[IntegerDigits[n],IntegerDigits[n,2]]],{n,400}],PrimeQ] (* Harvey P. Dale, Jul 15 2020 *)
  • PARI
    nb(n)=fromdigits(concat(n,binary(n)))
    A317744_upto(N=666)=[p|n<-[1..N], is/*pseudo*/prime(p=nb(n))] \\ M. F. Hasler, Apr 05 2024
  • Python
    from sympy import isprime
    def nbinn(n): return int(str(n)+bin(n)[2:])
    def ok(n): return isprime(nbinn(n))
    def aprefixupto(p): return [nbinn(k) for k in range(1, p+1, 2) if ok(k)]
    print(aprefixupto(319)) # Michael S. Branicky, Dec 27 2020
    
Previous Showing 11-13 of 13 results.