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.

Showing 1-2 of 2 results.

A349278 a(n) is the product of the sum of the last i digits of n, with i going from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 0, 3, 8, 15, 24, 35, 48, 63, 80, 99, 0, 4, 10, 18, 28, 40, 54, 70, 88, 108, 0, 5, 12, 21, 32, 45, 60, 77, 96, 117, 0, 6, 14, 24, 36, 50, 66, 84, 104, 126, 0, 7, 16, 27, 40, 55, 72, 91, 112, 135, 0
Offset: 1

Views

Author

Michel Marcus, Nov 13 2021

Keywords

Comments

This is similar to A349194 but with digits taken in reversed order.
The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Dec 04 2021
The positive terms form a subsequence of A349194. - Bernard Schott, Dec 19 2021

Examples

			For n=256, a(256) = 6*(6+5)*(6+5+2) = 858.
		

Crossrefs

Cf. A349194, A349279 (fixed points).

Programs

  • Mathematica
    a[n_] := Times @@ Accumulate @ Reverse @ IntegerDigits[n]; Array[a, 70] (* Amiram Eldar, Nov 13 2021 *)
  • PARI
    a(n) = my(d=Vecrev(digits(n))); prod(i=1, #d, sum(j=1, i, d[j]));
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return 0 if n%10==0 else prod(accumulate(map(int, str(n)[::-1])))
    print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Nov 13 2021

Formula

From Bernard Schott, Dec 04 2021: (Start)
a(n) = 0 iff n is a multiple of 10 (A008592).
a(n) = 1 iff n = 1.
a(n) = 2 (resp. 3, 4, 5, 7, 9) iff n = 10^k+1 (A000533) (resp. 2*10^k+1 (A199682), 3*10^k+1 (A199683), 4*10^k+1 (A199684), 6*10^k+1 (A199686), 8*10^k+1 (A199689)).
a(R_n) = n! where R_n = A002275(n) is repunit > 0, and n! = A000142(n).
a(n) = A349194(n) if n is palindrome (A002113). (End)

A349190 Numbers k such that k equals the product of the sum of its first i digits, with i going from 1 to the total number of digits of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 48, 24192
Offset: 1

Views

Author

Malo David, Nov 09 2021

Keywords

Comments

a(12) > 10^22 if it exists. - Max Alekseyev, Jan 19 2025

Examples

			24192 is a term since 24192 = 2*(2+4)*(2+4+1)*(2+4+1+9)*(2+4+1+9+2).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5],Times@@Total/@Table[IntegerDigits[#][[;;k]],{k,IntegerLength@#}]==#&] (* Giorgos Kalogeropoulos, Nov 10 2021 *)
  • PARI
    isok(k) = {my(d=digits(k)); prod(i=1, #d, sum(j=1, i, d[j])) == k;} \\ Michel Marcus, Nov 10 2021
    
  • Python
    def main(N): # prints all terms <= N
      for k in range(1,N+1):
        n1=str(k)
        n2 = 1
        for i in range(1,len(n1)+1):
          sum1 = 0
          for j in range(0,i):
            sum1 += int(n1[j])
          n2 = n2*sum1
        if n2 == k:
           print(k, end=", ")
    
  • Python
    from itertools import islice, accumulate, count
    from math import prod
    def A349190gen(): return filter(lambda n:prod(accumulate(int(d) for d in str(n))) == n,count(1)) # generator of terms
    A349190_list = list(islice(A349190gen(),11)) # Chai Wah Wu, Dec 02 2021
Showing 1-2 of 2 results.