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.

A119482 Numbers that are diminished by taking its sum of letters (writing out its English name and adding the letters using a=1, b=2, c=3, ...).

This page as a plain text file.
%I A119482 #21 Feb 12 2016 10:57:43
%S A119482 80,90,200,201,202,203,204,205,206,207,208,209,210,211,215,218,219,
%T A119482 240,250,251,255,256,258,259,260,270,280,281,282,283,284,285,286,287,
%U A119482 288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307
%N A119482 Numbers that are diminished by taking its sum of letters (writing out its English name and adding the letters using a=1, b=2, c=3, ...).
%C A119482 Note, since 202 a term, this is American English  (e.g. 'two hundred two', not 'two hundred and two'). - _Alvin Hoover Belt_, Jan 16 2016
%C A119482 Numbers that satisfy A073327(n) < n. - _Michel Marcus_, Jan 17 2016
%H A119482 Michael De Vlieger, <a href="/A119482/b119482.txt">Table of n, a(n) for n = 1..10000</a>
%e A119482 EIGHTY = 5+9+7+8+20+25 = 74, so 80 is in the sequence.
%t A119482 f[n_] := Block[{w, g, d = FromDigits /@ If[IntegerLength@ n > 3, Reverse@ TakeDrop[IntegerDigits@ n, -3], {IntegerDigits@ n}], r = <| 2 -> "hundred", 3 -> "thousand" |>, s = <| 10 -> "ten", 20 -> "twenty", 30 -> "thirty", 40 -> "forty", 50 -> "fifty", 60 -> "sixty", 70 -> "seventy", 80 -> "eighty", 90 -> "ninety" |>, t = <| 10 -> "ten", 11 -> "eleven", 12 -> "twelve", 13 -> "thirteen", 14 -> "fourteen", 15 -> "fifteen", 16 -> "sixteen", 17 -> "seventeen", 18 -> "eighteen", 19 -> "nineteen"|>, u = <| 0 -> "", 1 -> "one", 2 -> "two", 3 -> "three", 4 -> "four", 5 -> "five", 6 -> "six", 7 -> "seven", 8 -> "eight", 9 -> "nine" |>}, g[x_] := StringJoin[If[# == 0, "", Lookup[u, #] <> " " <> Lookup[r, 2]] &@ Floor[#/10^2] &@ x, " ", Which[0 <= # < 10, Lookup[u, #], 10 <= # < 20, Lookup[t, #], True, Lookup[s, 10 First@ #] <> " " <> Lookup[u, Last@ #] &@ IntegerDigits@ #] &@ (# - 10^2 Floor[#/10^2]) &@ x]; w = If[Length@ d == 2, g@ First@ d <> " " <> Lookup[r, 3] <> " " <> g@ Last@ d, g@ First@ d]; StringReplace[StringTrim@ w, "  " -> " "]]; Select[Range@ 300, Total[ToCharacterCode[StringReplace[f@ #, " " -> ""]] - 96] < # &] (* _Michael De Vlieger_, Jan 18 2016 *)
%o A119482 (PARI) for (n=1, 1000, if (A073327(n) < n, print1(n, ", "))) \\ using PARI scripts from A052360 and A073327; _Michel Marcus_, Jan 18 2016
%Y A119482 Cf. A073327.
%K A119482 nonn,word,less
%O A119482 1,1
%A A119482 _Tanya Khovanova_, Jul 26 2006
%E A119482 More terms from _Alvin Hoover Belt_, Jan 16 2016