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

A144688 "Magic" numbers: all numbers from 0 to 9 are magic; a number >= 10 is magic if it is divisible by the number of its digits and the number obtained by deleting the final digit is also magic.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 102, 105, 108, 120, 123, 126, 129, 141, 144, 147, 162, 165, 168, 180
Offset: 1

Views

Author

N. J. A. Sloane, based on email from Roberto Bosch Cabrera, Feb 02 2009

Keywords

Comments

Roberto Bosch Cabrera finds that there are exactly 20457 terms. (Total corrected by Zak Seidov, Feb 08 2009.)
The 20457th and largest term is the 25-digit number 3608528850368400786036725. - Zak Seidov, Feb 08 2009
a(n) is also the number such that every k-digit substring ( k <= n ) taken from the left, is divisible by k. - Gaurav Kumar, Aug 28 2009
A probabilistic estimate for the number of terms with k digits for the corresponding sequence in base b is b^k/k!, giving an estimate of e^b total terms. For this sequence, the estimate is approximately 22026, compared to the actual value of 20457. - Franklin T. Adams-Watters, Jul 18 2012
Numbers such that their first digit is divisible by 1, their first two digits are divisible by 2, and so on. - Charles R Greathouse IV, May 21 2013
These numbers are also called polydivisible numbers, because so many of their digits are divisible. - Martin Renner, Mar 05 2016
The unique zeroless pandigital (A050289) term, also called penholodigital, is a(7286) = 381654729 (see Penguin reference); so, the unique pandigital term (A050278) is a(9778) = 3816547290. - Bernard Schott, Feb 07 2022

Examples

			102 has three digits, 102 is divisible by 3, and 10 is also magic, so 102 is a member.
		

References

  • Robert Bosch, Tale of a Problem Solver, Arista Publishing, Miami FL, 2016.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Revised Edition), Penguin Books, 1997, entry 381654729, page 185.

Crossrefs

A subsequence of A098952.

Programs

  • Maple
    P1:={seq(i,i=1..9)}:
    for i from 2 to 25 do
      P||i:={}:
      for n from 1 to nops(P||(i-1)) do
        for j from 0 to 9 do
          if P||(i-1)[n]*10+j mod i = 0 then P||i:={op(P||i),P||(i-1)[n]*10+j}: fi:
        od:
      od:
    od:
    `union`({0},seq(P||i,i=1..25)); # Martin Renner, Mar 05 2016
  • Mathematica
    divQ[n_]:=Divisible[n,IntegerLength[n]];
    lessQ[n_]:=FromDigits[Most[IntegerDigits[n]]];
    pdQ[n_]:=If[Or[n<10,And[divQ[n],divQ[lessQ[n]]]],True];
    Select[Range[0,180],pdQ[#]&] (* Ivan N. Ianakiev, Aug 23 2016 *)
  • Python
    def agen(): # generator of terms
        yield 0
        magic, biggermagic, digits = list(range(1, 10)), [], 2
        while len(magic) > 0:
            yield from magic
            for i in magic:
                for d in range(10):
                    t = 10*i + d
                    if t%digits == 0:
                        biggermagic.append(t)
            magic, biggermagic, digits = biggermagic, [], digits+1
    print([an for an in agen()][:70]) # Michael S. Branicky, Feb 07 2022

A156071 Concatenation chain arising in A156069.

Original entry on oeis.org

3, 38, 381, 3816, 38165, 381654, 3816547, 38165472, 381654729
Offset: 1

Views

Author

Keywords

Comments

a(9) is a zeroless pandigital number in base 10, with 9 digits such that every k-digit substring ( 1 <= k <= 9 ) taken from the left, is divisible by k (see A163574). - Michel Marcus, Dec 01 2013

References

  • Matt Parker, Things to make and do in the fourth dimension, 2015, pages 7-9.

Crossrefs

A305714 Number of finite sequences of positive integers of length n that are polydivisible and strictly pandigital.

Original entry on oeis.org

1, 1, 1, 2, 0, 0, 2, 0, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 08 2018

Keywords

Comments

A sequence q of length k is strictly pandigital if it is a permutation of {1,2,...,k}. It is polydivisible if Sum_{i = 1...m} 10^(m - i) * q_i is a multiple of m for all 1 <= m <= k.

Examples

			Sequence of sets of n-digit numbers that are weakly polydivisible and strictly pandigital is (with A = 10):
  {0}
  {1}
  {12}
  {123,321}
  {}
  {}
  {123654,321654}
  {}
  {38165472}
  {381654729}
  {381654729A}
		

Crossrefs

A271373 Triangle T(n,k) read by rows giving the number of k-digit polydivisible numbers (see A144688) in base n with 1 <= k <= A109783(n).

Original entry on oeis.org

2, 1, 3, 3, 3, 3, 2, 2, 4, 6, 8, 8, 7, 4, 1, 5, 10, 17, 21, 21, 21, 13, 10, 6, 4, 6, 15, 30, 45, 54, 54, 49, 46, 21, 3, 1, 7, 21, 49, 87, 121, 145, 145, 145, 121, 92, 56, 33, 20, 14, 7, 3, 1, 1, 8, 28, 74, 148, 238, 324, 367, 367, 320, 258, 188, 122, 69, 37, 12, 6, 3
Offset: 2

Views

Author

Martin Renner, Apr 05 2016

Keywords

Examples

			The triangle begins
n\k 1  2  3  4  5  6  7  8  9 10 ...
2:  2  1
3:  3  3  3  3  2  2
4:  4  6  8  8  7  4  1
5:  5 10 17 21 21 21 13 10  6  4
...
		

Crossrefs

Cf. A109783 (row lengths), A143671 (row n=10), A144688, A271374 (row sums).

Programs

  • Maple
    b:=10; # Base
    P:={seq(i,i=1..b-1)}: # Polydivisible numbers
    M:=[nops(P)+1]: # Number of k-digit polydivisible numbers
    for i from 2 while nops(P)>0 do
      Q:={}:
      for n from 1 to nops(P) do
        for j from 0 to b-1 do
          if P[n]*b+j mod i = 0 then Q:={op(Q),P[n]*b+j}: fi:
        od:
      od:
      M:=[op(M),nops(Q)]:
      P:=Q;
    od:
    T||b:=op(M[1..nops(M)-1]); # Table row T(n,k) for n = b

Formula

T(n,k) ~ (n-1)*n^(k-1)/k!
T(10,k) = A143671(k), 1 <= k <= 25.

Extensions

Rows n=17 to n=25 added to b-file by Max Alekseyev, Sep 11 2021

A305715 Irregular triangle whose rows are all finite sequences of positive integers that are polydivisible and strictly pandigital.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 08 2018

Keywords

Comments

A positive integer sequence q of length k is strictly pandigital if it is a permutation of {1,2,...,k}. It is polydivisible if Sum_{i = 1...m} 10^(m - i) * q_i is a multiple of m for all 1 <= m <= k.

Examples

			Triangle is:
  {1}
  {1,2}
  {1,2,3}
  {3,2,1}
  {1,2,3,6,5,4}
  {3,2,1,6,5,4}
  {3,8,1,6,5,4,7,2}
  {3,8,1,6,5,4,7,2,9}
  {3,8,1,6,5,4,7,2,9,10}
		

References

  • Matt Parker, Things to make and do in the fourth dimension, 2015, pages 7-9.

Crossrefs

Programs

  • Mathematica
    polyQ[q_]:=And@@Table[Divisible[FromDigits[Take[q,k]],k],{k,Length[q]}];
    Flatten[Table[Select[Permutations[Range[n]],polyQ],{n,8}]]
Showing 1-5 of 5 results.