login
a(n) = the smallest number k such that sigma(k) ends with the same concatenation of digits as n in base 10.
1

%I #10 Sep 08 2022 08:46:11

%S 1,6,2,3,8,5,4,7,18,104,256,6,9,13,8,102,100,10,288,19,81,146,512,14,

%T 2928200,68,64,12,1089,29,16,21,121,90,6272,22,1600,37,18,27,441,20,

%U 722,43,1352,180,324,33,338,149,576,96,529,34,128,28,49,157,1058,24

%N a(n) = the smallest number k such that sigma(k) ends with the same concatenation of digits as n in base 10.

%e For n = 5, sigma(8) = 15, which ends in 5. The number 8 is the smallest number with this property so a(5) = 8.

%o (Magma) A256632:=func<n|exists(r){k:k in[1..10000000] | (SumOfDivisors(k)-n) mod 10^(#Intseq(n)) eq 0}select r else 0>; [A256632(n):n in[1..100]]

%o (PARI) a(n)=k=1;d=digits(n);while((sigma(k)-n)%(10^#d),k++);k

%o vector(50,n,a(n)) \\ _Derek Orr_, Apr 05 2015

%Y Cf. A000203, A072566.

%K nonn,base

%O 1,2

%A _Jaroslav Krizek_, Apr 05 2015