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.
%I A263042 #53 Mar 05 2025 01:12:26 %S A263042 0,2,4,6,8,10,12,14,16,18,3,5,7,9,11,13,15,17,19,21,6,8,10,12,14,16, %T A263042 18,20,22,24,9,11,13,15,17,19,21,23,25,27,12,14,16,18,20,22,24,26,28, %U A263042 30,15,17,19,21,23,25,27,29,31,33,18,20,22,24,26,28,30,32,34,36 %N A263042 a(n) = Sum_{i >= 1} d_i(n) * prime(i) where d_i(n) is the i-th digit of n in base 10, and prime(i) is the i-th prime. %C A263042 Digits are counted from the right, so d_1(n) is the ones digit, d_2(n) is the tens digit, etc. %C A263042 d_i(n) can be found using either of the following formulas: %C A263042 * d_i(n) = floor(n / 10^(i-1)) mod 10; %C A263042 * d_i(n) = floor(n / 10^(i-1)) - 10 * floor(n / 10^i). %C A263042 From _Derek Orr_, Dec 24 2015: (Start) %C A263042 For n < 1000, this sequence may be written as a series of 10 X 10 subtables: %C A263042 Subtable 1: %C A263042 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 %C A263042 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 %C A263042 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 %C A263042 9, 11, 13, 15, 17, 19, 21, 23, 25, 27 %C A263042 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 %C A263042 15, 17, 19, 21, 23, 25, 27, 29, 31, 33 %C A263042 18, 20, 22, 24, 26, 28, 30, 32, 34, 36 %C A263042 21, 23, 25, 27, 29, 31, 33, 35, 37, 39 %C A263042 24, 26, 28, 30, 32, 34, 36, 38, 40, 42 %C A263042 27, 29, 31, 33, 35, 37, 39, 41, 43, 45 %C A263042 Subtable 2: %C A263042 5, 7, 9, 11, 13, 15, 17, 19, 21, 23 %C A263042 8, 10, 12, 14, 16, 18, 20, 22, 24, 26 %C A263042 11, 13, 15, 17, 19, 21, 23, 25, 27, 29 %C A263042 14, 16, 18, 20, 22, 24, 26, 28, 30, 32 %C A263042 17, 19, 21, 23, 25, 27, 29, 31, 33, 35 %C A263042 20, 22, 24, 26, 28, 30, 32, 34, 36, 38 %C A263042 23, 25, 27, 29, 31, 33, 35, 37, 39, 41 %C A263042 26, 28, 30, 32, 34, 36, 38, 40, 42, 44 %C A263042 29, 31, 33, 35, 37, 39, 41, 43, 45, 47 %C A263042 32, 34, 36, 38, 40, 42, 44, 46, 48, 50 %C A263042 Subtable 3: %C A263042 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 %C A263042 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 %C A263042 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 %C A263042 19, 21, 23, 25, 27, 29, 31, 33, 35, 37 %C A263042 22, 24, 26, 28, 30, 32, 34, 36, 38, 40 %C A263042 25, 27, 29, 31, 33, 35, 37, 39, 41, 43 %C A263042 28, 30, 32, 34, 36, 38, 40, 42, 44, 46 %C A263042 31, 33, 35, 37, 39, 41, 43, 45, 47, 49 %C A263042 34, 36, 38, 40, 42, 44, 46, 48, 50, 52 %C A263042 37, 39, 41, 43, 45, 47, 49, 51, 53, 55 %C A263042 ... %C A263042 Each subtable is 10 X 10. Let T_n(j,k) = the element in the j-th row of the k-th column of subtable n. T_n(1,1) = 5*(n-1). T_n(j,1) = 5*(n-1)+3*(j-1). T_n(1,k) = 5*(n-1)+2*(k-1). Altogether, T_n(j,k) = 5*(n-1)+3*(j-1)+2*(k-1) = 5*n+3*j+2*k-10. %C A263042 (End) %H A263042 James Burling, <a href="/A263042/b263042.txt">Table of n, a(n) for n = 0..10000</a> %F A263042 a(n) = Sum_{i >= 0} prime(i + 1) * (floor(n / 10^i) - 10 * floor(n / 10^(i + 1))). %e A263042 For n = 12, the digits are 2 and 1 and the corresponding primes are 2 and 3, so a(12) = (first digit * first prime) + (second digit * second prime) = 2 * 2 + 1 * 3 = 4 + 3 = 7. %t A263042 Table[Sum_{m=0}^{infinity} (Floor[n/10^(m)] - 10*Floor[n/10^(m+1)])*Prime(m+1), {n,0,500}] (* _G. C. Greubel_, Oct 08 2015 *) %o A263042 (PARI) a(n) = if (n==0, d = [0], d=Vecrev(digits(n))); sum(i=1,#d, d[i]*prime(i)); \\ _Michel Marcus_, Oct 10 2015 %o A263042 (PARI) vector(200,n,n--;sum(i=1,#digits(n),Vecrev(digits(n))[i]*prime(i))) \\ _Derek Orr_, Dec 24 2015 %Y A263042 Similar method, different base for n: A089625 (base 2), A262478 (base 3). %Y A263042 Similar method, uses product instead of sum: A019565 (base 2), A101278 (base 3), A054842 (base 10). %K A263042 nonn,base,easy %O A263042 0,2 %A A263042 _James Burling_, Oct 08 2015