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.

A085645 Smallest number having n divisors ending with 1 or 9.

This page as a plain text file.
%I A085645 #32 Apr 21 2024 17:00:43
%S A085645 1,9,63,99,441,693,5103,1881,5733,4851,35721,9009,194481,56133,51597,
%T A085645 27027,2893401,63063,2711943423,81081,464373,392931,670761,153153,
%U A085645 2528253,2139291,693693,729729,18983603961,567567,1441237924662543,459459,4322241,31827411,22754277
%N A085645 Smallest number having n divisors ending with 1 or 9.
%C A085645 All a(n) must be in A331029. Also, a(n) cannot be a multiple of either 2 or 5 since removing these factors does not alter the number of divisors ending with 1 or 9. - _Andrew Howroyd_, Jan 07 2020
%H A085645 A. Stenger, <a href="http://www.mathnerds.com/best/DivisorExcess/index.aspx">An Excess of Divisors</a>
%H A085645 Wikipedia, <a href="http://www.wikipedia.org/wiki/Table_of_divisors">Table of divisors</a>
%e A085645 The divisors of 63 are 1, 3, 7, 9, 21 and 63. Three of them end either in 1 or 9. No smaller number satisfies this condition, so a(3) = 63
%t A085645 tbl=Table[Length[Select[IntegerDigits/@Divisors[i], Last[ # ]==1||Last[ # ]==9&]], {i, 50000}]; Table[First[Position[tbl, i]], {i, 12}]//Flatten
%t A085645 Module[{nn=3*10^6,lst},lst=Table[{n,Count[Divisors[n],_?(Mod[#,10]==1||Mod[#,10] == 9&)]},{n,nn}];Table[SelectFirst[lst,#[[2]]==k&],{k,18}]][[;;,1]] (* The program generates the first 18 terms of the sequence. *) (* _Harvey P. Dale_, Apr 21 2024 *)
%o A085645 (PARI) a(n)={forstep(k=1, oo, 2, if(sumdiv(k, d, abs(d%10-5)==4) == n, return(k)))} \\ _Andrew Howroyd_, Jan 07 2020
%o A085645 (PARI) \\ faster program: needs lista331029 defined in A331029.
%o A085645 a(n)={my(lim=1); while(1, lim*=10; my(S=lista331029(lim)); for(i=1, #S, my(k=S[i]); if(sumdiv(k, d, abs(d%10-5)==4)==n, return(k))))} \\ _Andrew Howroyd_, Jan 07 2020
%Y A085645 Cf. A331029, A331082.
%K A085645 base,nonn
%O A085645 1,2
%A A085645 _Lekraj Beedassy_, Jul 11 2003
%E A085645 Corrected and extended by _Harvey P. Dale_, Jul 18 2003
%E A085645 Terms a(17) and beyond from _Andrew Howroyd_, Jan 07 2020