cp's OEIS Frontend

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.

A262478 a(n) = Sum_{i >= 0} d_i(n) * p_(i + 1) where d_i(n) = i-th digit of n in base 3, and p_i = i-th prime.

This page as a plain text file.
%I A262478 #21 Oct 02 2015 12:02:08
%S A262478 0,2,4,3,5,7,6,8,10,5,7,9,8,10,12,11,13,15,10,12,14,13,15,17,16,18,20,
%T A262478 7,9,11,10,12,14,13,15,17,12,14,16,15,17,19,18,20,22,17,19,21,20,22,
%U A262478 24,23,25,27,14,16,18,17,19,21,20,22,24,19,21,23,22,24,26,25,27,29,24,26,28,27
%N A262478 a(n) = Sum_{i >= 0} d_i(n) * p_(i + 1) where d_i(n) = i-th digit of n in base 3, and p_i = i-th prime.
%C A262478 d_i(n) can be found using either of the following formulas:
%C A262478 * d_i(n) = floor(n / 3^i) mod 3;
%C A262478 * d_i(n) = floor(n / 3^i) - 3 * floor(n / 3^(i + 1)).
%H A262478 James Burling, <a href="/A262478/b262478.txt">Table of n, a(n) for n = 0..10000</a>
%F A262478 a(n) = Sum_{i >= 0} p_(i + 1) * (floor(n / 3^i) - 3 * floor(n / 3^(i + 1))).
%e A262478 The base 3 representation of n = 5 is 12 so a(5) = 2 * 2 + 1 * 3 = 7.
%e A262478 The base 3 representation of n = 12 is 110 so a(12) = 0 * 2 + 1 * 3 + 1 * 5 = 8.
%t A262478 Table[Sum[IntegerDigits[n, 3][[-i]] Prime@ i, {i, IntegerLength[n, 3]}], {n, 0, 81}] (* _Michael De Vlieger_, Sep 24 2015 *)
%o A262478 (PARI) a(n) = my(d = Vecrev(digits(n, 3))); sum(k=1, #d, d[k]*prime(k)); \\ _Michel Marcus_, Sep 24 2015
%Y A262478 Similar method, different base for n: A089625 (base 2).
%Y A262478 Similar method, uses product for sum index for multiplication: A019565 (base 2), A101278 (base 3), A054842 (base 10).
%K A262478 nonn,base
%O A262478 0,2
%A A262478 _James Burling_, Sep 23 2015