[go: up one dir, main page]

login
Revisions by Paolo P. Lava (See also Paolo P. Lava's wiki page)

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

Showing entries 1-10 | older changes
Primes that remain prime when a single digit 3 is inserted between any two consecutive digits or as the leading or trailing digit.
(history; published version)
#25 by Paolo P. Lava at Mon Nov 18 08:19:09 EST 2024
MAPLE

A215419:=proc(q, x)

local a, b, c, d, i, n, ok;

for n from 1 to q do

a:=ithprime(n); b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od;

a:=ithprime(n); ok:=1;

for i from 0 to b do

c:=a+9*10^i*trunc(a/10^i)+10^i*x; if not isprime(c) then ok:=0; break; fi;

od;

if ok=1 then print(ithprime(n)); fi;

od; end:

A215419(1000, 3);

# Alternative:

STATUS

approved

editing

Numbers k such that k equals the sum of its digits raised to the consecutive powers (1,2,3,...).
(history; published version)
#70 by Paolo P. Lava at Wed Oct 30 08:02:48 EDT 2024
STATUS

editing

proposed

#69 by Paolo P. Lava at Wed Oct 30 08:02:34 EDT 2024
MAPLE

# Alternative code

P:=proc(q) local a, k, n, v; v:=[]; for n from 0 to q do a:=convert(n, base, 10);

if n=add(a[-k]^k, k=1..nops(a)) then v:=[op(v), n]; fi; od; op(v); end: P(3*10^6); # Paolo P. Lava, Oct 29 2024

STATUS

proposed

editing

#64 by Paolo P. Lava at Tue Oct 29 06:47:26 EDT 2024
STATUS

editing

proposed

#63 by Paolo P. Lava at Tue Oct 29 06:44:54 EDT 2024
MAPLE

# Alternative code

P:=proc(q) local a, k, n, v; v:=[]; for n from 0 to q do a:=convert(n, base, 10);

if n=add(a[-k]^k, k=1..nops(a)) then v:=[op(v), n]; fi; od; op(v); end: P(3*10^6); Paolo P. Lava, Oct 29 2024

STATUS

proposed

editing

Least integer k which, by a process analogous to the Keith numbers, reach k - n.
(history; published version)
#3 by Paolo P. Lava at Mon Oct 28 12:03:33 EDT 2024
STATUS

editing

proposed

Least integer k which, by a process analogous to the Keith numbers, reach k + n.
(history; published version)
#7 by Paolo P. Lava at Mon Oct 28 12:03:26 EDT 2024
STATUS

editing

proposed

#6 by Paolo P. Lava at Mon Oct 28 11:56:30 EDT 2024
CROSSREFS
STATUS

proposed

editing

Least integer k which, by a process analogous to the Keith numbers, reach k - n.
(history; published version)
#2 by Paolo P. Lava at Mon Oct 28 11:55:43 EDT 2024
NAME

allocated for Paolo P. Lava

Least integer k such that, through a process analogous to the Keith numbers, it reaches k - n.

DATA

14, 18, 10, 11, 12, 10, 11, 10, 10, 10, 20, 27, 22, 25, 20, 23, 20, 21, 20, 38, 32, 30, 31, 34, 30, 32, 31, 30, 40, 47, 41, 45, 40, 43, 42, 41, 40, 58, 51, 56, 50, 54, 53, 52, 51, 50, 61, 67, 60, 65, 64, 63, 62, 61, 60, 78, 70, 76, 75, 74, 73, 72, 71, 70, 80, 87

OFFSET

0,1

EXAMPLE

a(6) = 11 because 1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5 that is 11 - 6.

MAPLE

with(numtheory): P:=proc(q, h) local a, b, c, j, k, n, t, v; v:=array(1..h); c:=[];

for j from 0 to 65 do for n from 10 to q do a:=n; b:=length(a);

for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b);

while v[t]<n-j do t:=t+1; v[t]:=add(v[k], k=t-b..t-1); od; if v[t]=n-j then c:=[op(c), n];

break; fi; od; od; op(c); end: P(10^6, 5000);

CROSSREFS
KEYWORD

allocated

nonn,easy,base

AUTHOR

Paolo P. Lava, Oct 28 2024

STATUS

approved

editing

#1 by Paolo P. Lava at Mon Oct 28 11:55:43 EDT 2024
NAME

allocated for Paolo P. Lava

KEYWORD

allocated

STATUS

approved