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.

User: James Burling

James Burling's wiki page.

James Burling has authored 5 sequences.

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.

Original entry on oeis.org

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, 18, 20, 22, 24, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36
Offset: 0

Author

James Burling, Oct 08 2015

Keywords

Comments

Digits are counted from the right, so d_1(n) is the ones digit, d_2(n) is the tens digit, etc.
d_i(n) can be found using either of the following formulas:
* d_i(n) = floor(n / 10^(i-1)) mod 10;
* d_i(n) = floor(n / 10^(i-1)) - 10 * floor(n / 10^i).
From Derek Orr, Dec 24 2015: (Start)
For n < 1000, this sequence may be written as a series of 10 X 10 subtables:
Subtable 1:
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, 18, 20, 22, 24
9, 11, 13, 15, 17, 19, 21, 23, 25, 27
12, 14, 16, 18, 20, 22, 24, 26, 28, 30
15, 17, 19, 21, 23, 25, 27, 29, 31, 33
18, 20, 22, 24, 26, 28, 30, 32, 34, 36
21, 23, 25, 27, 29, 31, 33, 35, 37, 39
24, 26, 28, 30, 32, 34, 36, 38, 40, 42
27, 29, 31, 33, 35, 37, 39, 41, 43, 45
Subtable 2:
5, 7, 9, 11, 13, 15, 17, 19, 21, 23
8, 10, 12, 14, 16, 18, 20, 22, 24, 26
11, 13, 15, 17, 19, 21, 23, 25, 27, 29
14, 16, 18, 20, 22, 24, 26, 28, 30, 32
17, 19, 21, 23, 25, 27, 29, 31, 33, 35
20, 22, 24, 26, 28, 30, 32, 34, 36, 38
23, 25, 27, 29, 31, 33, 35, 37, 39, 41
26, 28, 30, 32, 34, 36, 38, 40, 42, 44
29, 31, 33, 35, 37, 39, 41, 43, 45, 47
32, 34, 36, 38, 40, 42, 44, 46, 48, 50
Subtable 3:
10, 12, 14, 16, 18, 20, 22, 24, 26, 28
13, 15, 17, 19, 21, 23, 25, 27, 29, 31
16, 18, 20, 22, 24, 26, 28, 30, 32, 34
19, 21, 23, 25, 27, 29, 31, 33, 35, 37
22, 24, 26, 28, 30, 32, 34, 36, 38, 40
25, 27, 29, 31, 33, 35, 37, 39, 41, 43
28, 30, 32, 34, 36, 38, 40, 42, 44, 46
31, 33, 35, 37, 39, 41, 43, 45, 47, 49
34, 36, 38, 40, 42, 44, 46, 48, 50, 52
37, 39, 41, 43, 45, 47, 49, 51, 53, 55
...
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.
(End)

Examples

			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.
		

Crossrefs

Similar method, different base for n: A089625 (base 2), A262478 (base 3).
Similar method, uses product instead of sum: A019565 (base 2), A101278 (base 3), A054842 (base 10).

Programs

  • Mathematica
    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 *)
  • 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
    
  • PARI
    vector(200,n,n--;sum(i=1,#digits(n),Vecrev(digits(n))[i]*prime(i))) \\ Derek Orr, Dec 24 2015

Formula

a(n) = Sum_{i >= 0} prime(i + 1) * (floor(n / 10^i) - 10 * floor(n / 10^(i + 1))).

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.

Original entry on oeis.org

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, 7, 9, 11, 10, 12, 14, 13, 15, 17, 12, 14, 16, 15, 17, 19, 18, 20, 22, 17, 19, 21, 20, 22, 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
Offset: 0

Author

James Burling, Sep 23 2015

Keywords

Comments

d_i(n) can be found using either of the following formulas:
* d_i(n) = floor(n / 3^i) mod 3;
* d_i(n) = floor(n / 3^i) - 3 * floor(n / 3^(i + 1)).

Examples

			The base 3 representation of n = 5 is 12 so a(5) = 2 * 2 + 1 * 3 = 7.
The base 3 representation of n = 12 is 110 so a(12) = 0 * 2 + 1 * 3 + 1 * 5 = 8.
		

Crossrefs

Similar method, different base for n: A089625 (base 2).
Similar method, uses product for sum index for multiplication: A019565 (base 2), A101278 (base 3), A054842 (base 10).

Programs

  • Mathematica
    Table[Sum[IntegerDigits[n, 3][[-i]] Prime@ i, {i, IntegerLength[n, 3]}], {n, 0, 81}] (* Michael De Vlieger, Sep 24 2015 *)
  • PARI
    a(n) = my(d = Vecrev(digits(n, 3))); sum(k=1, #d, d[k]*prime(k)); \\ Michel Marcus, Sep 24 2015

Formula

a(n) = Sum_{i >= 0} p_(i + 1) * (floor(n / 3^i) - 3 * floor(n / 3^(i + 1))).

A248591 Numerators of the (simplified) rationals n*2^(n - 1)/(n - 1)! .

Original entry on oeis.org

1, 4, 6, 16, 10, 8, 28, 64, 2, 8, 44, 32, 52, 16, 8, 256, 34, 8, 76, 32, 4, 16, 184, 128, 4, 16, 8, 64, 232, 32, 496, 1024, 2, 8, 4, 32, 148, 16, 8, 128, 164, 16, 344, 64, 8, 32, 752, 512, 4, 16, 8, 64, 424, 32, 16, 256, 8, 32, 944, 128, 976, 64, 32, 4096, 2
Offset: 1

Author

James Burling, Oct 09 2014

Keywords

Crossrefs

Cf. A248592 (denominators).

Programs

  • Magma
    [Numerator(n*2^(n-1)/Factorial(n-1)): n in [1..70]]; // Vincenzo Librandi, Oct 16 2014
  • Mathematica
    Table[Numerator[n 2^(n - 1)/(n - 1)!], {n, 1, 70}] (* Vincenzo Librandi, Oct 16 2014 *)
  • PARI
    vector(100, n, numerator(n*2^(n - 1)/(n - 1)!)) \\ Michel Marcus, Oct 09 2014
    

Formula

a(n) = numerator(n*2^(n - 1)/(n - 1)!).
a(n) = numerator(g(1, n)) where g(m, n) = m if m = n; 2*g(m + 1, n)/m otherwise.

Extensions

More terms from Michel Marcus, Oct 09 2014

A248592 Denominators of the (simplified) rational numbers n*2^(n - 1)/(n - 1)! .

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 45, 315, 35, 567, 14175, 51975, 467775, 868725, 2837835, 638512875, 638512875, 1206079875, 97692469875, 371231385525, 441942125625, 17717861581875, 2143861251406875, 16436269594119375, 5917057053882975, 284473896821296875, 1780595872696265625
Offset: 1

Author

James Burling, Oct 09 2014

Keywords

Crossrefs

Cf. A248591 (numerators).
Has same start as A241591 but is a different sequence.

Programs

  • Maple
    A248592 := proc(n)
        n*2^(n-1)/(n-1)! ;
        denom(%) ;
    end proc:
    seq(A248592(n),n=1..30) ; # R. J. Mathar, Oct 10 2014
  • PARI
    vector(40, n, denominator(n*2^(n - 1)/(n - 1)!)) \\ Michel Marcus, Oct 09 2014

Formula

a(n) = denom(n * 2^(n - 1) / (n - 1)!).
a(n) = denom(g(1, n)) where g(m, n) = m if m = n; 2g(m + 1, n)/m otherwise.

Extensions

More terms from Michel Marcus, Oct 09 2014

A240988 Denominators of the (reduced) rationals (((n-1)!!)/(n!! * 2^((1 + (-1)^n)/2)))^((-1)^n), where n is a positive integer.

Original entry on oeis.org

1, 4, 2, 16, 8, 32, 16, 256, 128, 512, 256, 2048, 1024, 4096, 2048, 65536, 32768, 131072, 65536, 524288, 262144, 1048576, 524288, 8388608, 4194304, 16777216, 8388608, 67108864, 33554432, 134217728, 67108864, 4294967296, 2147483648, 8589934592, 4294967296
Offset: 1

Author

James Burling, Aug 06 2014

Keywords

Comments

Numerators for this sequence are the swinging factorial A163590, starting from n = 1.
The terms are all powers of 2 (A000079).
It appears that a(2*n) = 2^A101925(n) and a(2*n+1) = 2^A005187(n). - Robert Israel, Aug 06 2014

Examples

			For n = 1, a(1) = 1.
For n = 2, a(2) = 2 * 2 = 4.
For n = 6, a(6) = 2 * 2 * 4 * 2 = 32.
		

Crossrefs

Cf. A163590 (numerators).

Programs

  • Maple
    f:= n -> denom(((doublefactorial(n-1)) / (doublefactorial(n)*2^((1+(-1)^n)/2)))^((-1)^n)):
    seq(f(n), n=1..100); # Robert Israel, Aug 06 2014
  • PARI
    df(n) = prod(i=0, floor((n-1)/2), n-2*i) \\ Double factorial (n!!)
    a(n) = denominator(((df(n-1)) / (df(n)*2^((1+(-1)^n)/2)))^((-1)^n))
    vector(50, n, a(n)) \\ Colin Barker, Aug 06 2014

Formula

a(n) = denominator((((n-1)!!)/(n!! * 2^((1 + (-1)^n)/2)))^((-1)^n)).
a(n) = denominator(g(1, n)) where g(m, n) = m if m = n; m/(2 * g(m + 1, n)) otherwise.

Extensions

More terms from Colin Barker, Aug 06 2014