login
A368062
Numbers k such that k = A257850(k) + A257297(k).
1
0, 36, 655, 1258, 6208, 12508, 45715, 65455, 75385, 125008, 235297, 1250008, 2857144, 3214288, 4210528, 6545455, 6792453, 12500008, 34615386, 47058824, 87671233, 125000008, 654545455, 1250000008, 9529411765, 12500000008, 39130434783, 45714285715, 65454545455, 75384615385
OFFSET
1,2
LINKS
Nicolas Bělohoubek, C# program
Nicolas Bělohoubek, Subsequences of form A-(B)-C
Kevin Ryde, PARI/GP Code
EXAMPLE
0 = 0*0 + 0*0;
36 = 3*6 + 3*6;
655 = 6*55 + 65*5;
6208 = 6*208 + 620*8;
...
MATHEMATICA
Select[Range[0, 10^6], Part[digits=IntegerDigits[#], 1]FromDigits[Drop[digits, 1]] + FromDigits[Drop[digits, -1]]Part[digits, Length[digits]] == # &] (* Stefano Spezia, Dec 10 2023 *)
PROG
(Python)
def ok(n):
if n < 10: return n == 0
s = str(n)
return n == int(s[0])*int(s[1:]) + (n%10)*(n//10)
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 10 2023
(Python) # faster for generating initial segment of sequence
from itertools import count, islice
def agen(): # generator of terms
yield 0
for digits in count(2):
for first in range(1, 10):
base = first*10**(digits-1)
for rest in range(10**(digits-1)):
n = base + rest
if first*rest + (n%10)*(n//10) == n:
yield n
print("...", digits, first, time()-time0, alst)
print(list(islice(agen(), 18))) # Michael S. Branicky, Dec 10 2023
(PARI) See links.
CROSSREFS
Sequence in context: A035713 A035478 A250624 * A231767 A278277 A188305
KEYWORD
nonn,base
AUTHOR
Nicolas Bělohoubek, Dec 10 2023
EXTENSIONS
a(24)-a(30) from Michael S. Branicky, Dec 10 2023
STATUS
approved