(Translated by https://www.hiragana.jp/)
The On-Line Encyclopedia of Integer Sequences (OEIS)
login

Revision History for A117388

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the smallest n-digit integer such that, if all numbers formed by inserting the exponentiation symbol between any two digits are added up, the sum is prime.
(history; published version)
#16 by Michel Marcus at Mon Jun 27 11:25:45 EDT 2022
STATUS

reviewed

approved

#15 by Joerg Arndt at Mon Jun 27 11:12:06 EDT 2022
STATUS

proposed

reviewed

#14 by Michel Marcus at Mon Jun 27 11:10:13 EDT 2022
STATUS

editing

proposed

#13 by Michel Marcus at Mon Jun 27 11:10:09 EDT 2022
MATHEMATICA

(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := Block[{k = (10^n - 1)/9}, While[id = IntegerDigits@k; First@ Union@ id == 0 || !PrimeQ[Plus @@ Table[FromDigits@ Take[id, {1, k}]^FromDigits@ Take[id, {k + 1, n}], {k, n - 1}]], k++ ]; k]; Do[Print[f[n]] // Timing, {n, 2, 7}] - _(* _Robert G. Wilson v_, Apr 27 2006 *)

STATUS

proposed

editing

#12 by Michael S. Branicky at Mon Jun 27 10:46:35 EDT 2022
STATUS

editing

proposed

#11 by Michael S. Branicky at Mon Jun 27 10:41:11 EDT 2022
PROG

(Python)

from sympy import isprime

from itertools import product

def a(n):

for p in product("123456789", repeat=n):

s = "".join(p)

if isprime(sum(int(s[:i])**int(s[i:]) for i in range(1, n))):

return int(s)

print([a(n) for n in range(2, 6)]) # Michael S. Branicky, Jun 27 2022

STATUS

approved

editing

#10 by Bruno Berselli at Sat Jan 11 10:37:55 EST 2014
STATUS

proposed

approved

#9 by Michel Marcus at Sat Jan 11 10:35:18 EST 2014
STATUS

editing

proposed

#8 by Michel Marcus at Sat Jan 11 10:35:14 EST 2014
NAME

a(n) is the smallest n-digit integer such that, if all numbers formed by inserting the exponentation exponentiation symbol between any two digits are added up, the sum is prime.

STATUS

approved

editing

#7 by Charles R Greathouse IV at Sat Jul 14 11:41:08 EDT 2012
MATHEMATICA

(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := Block[{k = (10^n - 1)/9}, While[id = IntegerDigits@k; First@ Union@ id == 0 || !PrimeQ[Plus @@ Table[FromDigits@ Take[id, {1, k}]^FromDigits@ Take[id, {k + 1, n}], {k, n - 1}]], k++ ]; k]; Do[Print[f[n]] // Timing, {n, 2, 7}] - _Robert G. Wilson v (rgwv(at)rgwv.com), _, Apr 27 2006

EXTENSIONS

a(6) from _Robert G. Wilson v (rgwv(at)rgwv.com) _ and Farideh Firoozbakht, Apr 27 2006

Discussion
Sat Jul 14
11:41
OEIS Server: https://oeis.org/edit/global/1816