This site is supported by donations to The OEIS Foundation.

User:Christopher Lamb

From OeisWiki
Jump to: navigation, search

To the editor-in-chief: Thanks for the excellent site. I have a small contribution, that of speeding up the generation of A069561 in Mathematica by the use of memoization:

(* A069561 *) q[1] = 0; q[2] = 0; q[n_] := (ModularInverse[Times @@ Prime[Range[n-1]], Prime[n]] * Mod[Prime[n]-n+1-g[n-1], Prime[n]]) // Mod[#, Prime[n]]&; g[1] = 2; g[2] = 2; g[r_] :=g[r]= g[r-1] + q[r] * Times @@ Prime[Range[r-1]];

Array[g, 31]

I hesitate to provide the bio information that the site requires (beyond the encoded email below) and wonder whether a) you can use the above Mma code "anonymously", or b) I can demonstrate to you, w/o exposing any more widely, that I am "genuine"

For what it's worth, "Christopher Lamb" is my userid on Mathematica Stack Exchange.

Thanks for your time! Christopher



Executing the below in Mathematica produces my email:

StringTake[ExampleData[{"Text", "Prufrock"}] <> "@",

 List /@ {2785, -3333, 941, 3593, 3930, 5642, -1, 5496, 3395, 362, 
   1219 , 5637, 2173, 2306, 2307, 3103} ] // StringJoin