[seqfan] Re: Can anyone explain A206159?

hv at crypt.org hv at crypt.org
Tue May 3 02:05:59 CEST 2022

Neil Sloane <njasloane at gmail.com> wrote:
:Harvey Dale just asked me why the numbers 2, 3, 5, 7, 22, 55, and 77 (and
:lots of others)  are missing, and I am baffled.

Part of the author's original submission was the Haskell program, which
based on my limited understanding appears to do what you'd expect - list
those n for which A095048(n) <= 2.

I've installed ghc, a Haskell compiler and interpreter, and confirm
that the supplied program(s) give a different set of results that look
much more like you'd expect:

> map a206159 [1..20]

I can only assume that when preparing the submission the author pasted
in the output of some other function by mistake.

Complete session is below, I can easily provide a longer list if desired.

% ghci
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Prelude> import Data.List (group, sort)
Prelude Data.List> let a027750_row n = filter ((== 0) . (mod n)) [1..n]
Prelude Data.List> let a095048 = length . group . sort . concatMap show . a027750_row
Prelude Data.List> let a206159_list = filter ((<= 2) . a095048) [1..]
Prelude Data.List> let a206159 n = a206159_list !! (n-1)
Prelude Data.List> map a206159 [1..20]
Prelude Data.List> ^D
Leaving GHCi.

More information about the SeqFan mailing list