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-4 of 4 results.

A156208 Primes appearing as the products of digits and positions in A156207(i) in the order of appearance.

Original entry on oeis.org

2, 3, 5, 7, 3, 5, 7, 11, 13, 17, 19, 2, 3, 5, 7, 11, 13, 17, 19, 5, 7, 11, 13, 17, 19, 23, 7, 11, 13, 17, 19, 23, 11, 13, 17, 19, 23, 7, 13, 19, 3, 5, 11, 17, 23, 29, 7, 13, 19, 31, 11, 17, 23, 29, 13, 19, 31, 37, 17, 23, 29, 41, 19, 31, 37, 43, 2, 5, 11, 17, 23, 29, 7, 13, 19, 31, 11
Offset: 1

Views

Author

Cino Hilliard, Feb 05 2009, Feb 08 2009

Keywords

Comments

A156207 read without the 1's and without the composites. - R. J. Mathar, Sep 07 2016

Examples

			For n=19 we have 1*1 + 2*9 = 19 prime and the sequence.
		

Crossrefs

Cf. A156207.

Programs

  • Maple
    f:= proc(n) local L,i,a;
      L:= convert(n,base,10);
      a:= add(L[-i]*i,i=1..nops(L));
      if isprime(a) then a else NULL fi
    end proc:
    map(f, [$1..1000]); # Robert Israel, Sep 07 2016
  • PARI
    g1(n) = for(j=1,n,if(isprime(g(j)),print1(g(j)",")))
    g(n) = v=Vec((Str(n)));sum(x=1,length(v),x*eval(v[x]))

Formula

Given a number n with digits d1d2d3...dm, a(n) = d1*1+d2*2+d3*3+...+dm*m.
If a(n) is prime, list it.

Extensions

Definition clarified. - R. J. Mathar, Sep 07 2016

A117241 Numbers divisible by the sum of k times the k-th digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 20, 30, 38, 40, 50, 57, 60, 70, 76, 80, 90, 95, 100, 104, 120, 190, 200, 207, 208, 231, 240, 252, 300, 310, 360, 380, 400, 403, 414, 430, 432, 462, 465, 480, 500, 506, 528, 570, 600, 620, 625, 629, 693, 700, 702, 714, 754, 760, 800, 805, 806
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 22 2006

Keywords

Examples

			95 is in the sequence because 1*9 + 2*5 = 19 and 95 is divisible by 19.
1232 is in the sequence because 1*1 + 2*2 + 3*3 + 4*2 = 22 and 1232 is divisible by 22.
		

Crossrefs

Cf. A156207.

Programs

  • Mathematica
    Select[Range[1000], Divisible[#, Plus @@ ((d = IntegerDigits[#]) * Range[Length[d]])] &] (* Amiram Eldar, Feb 08 2021 *)

Extensions

Missing terms inserted by Amiram Eldar, Feb 08 2021

A156294 Sum of products of the digits of prime numbers and the position of the digits in the prime numbers.

Original entry on oeis.org

2, 3, 5, 7, 3, 7, 15, 19, 8, 20, 5, 17, 6, 10, 18, 11, 23, 8, 20, 9, 13, 25, 14, 26, 23, 4, 10, 22, 28, 12, 26, 10, 28, 34, 36, 14, 32, 22, 34, 24, 42, 20, 22, 28, 40, 46, 7, 15, 27, 33, 17, 35, 13, 15, 33, 23, 41, 19, 37, 21, 27, 29, 24, 8, 14, 26, 12, 30, 32, 38, 22, 40, 36, 26, 44
Offset: 1

Views

Author

Cino Hilliard, Feb 07 2009

Keywords

Examples

			For n = 5, prime(5) = 11 and A156207(11) = 1*1 + 1*2 = 3. So, a(5) = 3. - _Indranil Ghosh_, Feb 11 2017
		

Programs

  • Mathematica
    Table[Total[IntegerDigits[#] Range@ IntegerLength@ #] &@ Prime@ n, {n, 75}] (* Michael De Vlieger, Feb 11 2017 *)
  • PARI
    g(x) = local(v,j);v=Vec((Str(x))); sum(j=1, length(v), j*eval(v[j]))
    g1(n) = local(j);forprime(j=1,n,print1(g(j)","))

Formula

a(n) = A156207(prime(n)). - R. J. Mathar, Sep 10 2016

A381135 Numbers of the form d_1 d_2 d_3 ... where the sum of their digits multiplied by their digit positions is equal to their number of digits.

Original entry on oeis.org

1, 20, 110, 300, 1010, 2100, 4000, 10010, 12000, 20100, 31000, 50000, 100010, 111000, 200100, 220000, 301000, 410000, 600000, 1000010, 1020000, 1101000, 1300000, 2000100, 2110000, 3001000, 3200000, 4010000, 5100000, 7000000, 10000010, 10110000, 11001000, 12100000
Offset: 1

Views

Author

Leo Crabbe, Feb 14 2025

Keywords

Comments

The digits for these numbers are 1-indexed.
Numbers k such that A156207(k) = A055642(k).

Examples

			301000 is a member of this sequence because it has 3*1 + 1*3 = 6 digits.
		

Crossrefs

Programs

  • PARI
    isok(k) = my(d=digits(k)); sum(i=1, #d, i*d[i]) == #d; \\ Michel Marcus, Feb 17 2025
  • Python
    def ok(n): return sum(int(d)*(i+1) for i, d in enumerate(str(n))) == len(str(n))
    
  • Python
    # see linked program for a different algorithm
    from itertools import count, islice
    from sympy.utilities.iterables import partitions
    def agen(): # generator of terms
        for d in count(1): yield from sorted(int("".join(str(p[k]) if k in p else "0" for k in range(1, d+1))) for p in partitions(d, m=d, k=d) if max(p.values()) < 10 if 1 in p and p[1] != 0)
    print(list(islice(agen(), 34))) # Michael S. Branicky, Feb 19 2025
    

Extensions

More terms from Michel Marcus, Feb 17 2025
Showing 1-4 of 4 results.