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.

A178157 Numbers k that are divisible by every prefix of k.

This page as a plain text file.
%I A178157 #18 May 03 2025 14:22:32
%S A178157 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,33,
%T A178157 36,39,40,44,48,50,55,60,66,70,77,80,88,90,99,100,110,120,130,140,150,
%U A178157 160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,330,360,390,400,420,440,460,480,500,510,520,530,540,550,560
%N A178157 Numbers k that are divisible by every prefix of k.
%H A178157 Alois P. Heinz, <a href="/A178157/b178157.txt">Table of n, a(n) for n = 1..1000</a>
%e A178157 3570 is in the sequence because:
%e A178157      3 | 3570;
%e A178157     35 | 3570;
%e A178157    357 | 3570;
%e A178157   3570 | 3570.
%p A178157 with(numtheory):T:=array(1..9):for n from 1 to 10000 do:ind:=0:l:=length(n):n0:=n:s:=0:for
%p A178157   m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :T[m]:=u:od:for i from
%p A178157   1 to l do: s1:=0:for j from 0 to i-1 do: s1:=s1 + T[l-i+j+1]*10^j :od:if irem(n,s1)=0
%p A178157   then ind:=ind+1:else fi:od:if ind=l then printf(`%d, `,n):else fi:od:
%t A178157 Select[Range[560],AllTrue[Table[Boole[Divisible[#,Floor[#/10^i]]],{i,0,Log10[#]}],Positive] &] (* _Stefano Spezia_, May 03 2025 *)
%Y A178157 Cf. A034837.
%K A178157 nonn,base
%O A178157 1,2
%A A178157 _Michel Lagneau_, Dec 17 2010