ProjectEuler 492 Exploding sequence - 拼圖
By Catherine
at 2014-12-18T07:05
at 2014-12-18T07:05
Table of Contents
492. Exploding sequence
https://projecteuler.net/problem=492
定義數列a_1, a_2, a_3, ... 如下:
‧a_1 = 1。
‧a_(n+1) = 6a_n^2 + 10a_n + 3對所有n≧1。
例如:
a_3 = 2359
a_6 = 269221280981320216750489044576319
a_6 mod 1000000007 = 203064689
a_100 mod 1000000007 = 456482974
定義B(x,y,n)為Σ(a_n mod p)對所有在x≦p≦x+y範圍內的質數p求和。
例如:
B(10^9, 10^3, 10^3) = 23674718882
B(10^9, 10^3, 10^15) = 20731563854
請求出B(10^9, 10^7, 10^15)。
--
https://projecteuler.net/problem=492
定義數列a_1, a_2, a_3, ... 如下:
‧a_1 = 1。
‧a_(n+1) = 6a_n^2 + 10a_n + 3對所有n≧1。
例如:
a_3 = 2359
a_6 = 269221280981320216750489044576319
a_6 mod 1000000007 = 203064689
a_100 mod 1000000007 = 456482974
定義B(x,y,n)為Σ(a_n mod p)對所有在x≦p≦x+y範圍內的質數p求和。
例如:
B(10^9, 10^3, 10^3) = 23674718882
B(10^9, 10^3, 10^15) = 20731563854
請求出B(10^9, 10^7, 10^15)。
--
Tags:
拼圖
All Comments
Related Posts
ProjectEuler 491 Double pandigital num
By John
at 2014-12-18T06:58
at 2014-12-18T06:58
ProjectEuler 490 Jumping frog
By Lydia
at 2014-12-11T23:31
at 2014-12-11T23:31
ProjectEuler 489 Common factors between two sequences
By Carol
at 2014-12-11T23:07
at 2014-12-11T23:07
Puzzleup 2014 (20) Balls
By John
at 2014-12-10T21:32
at 2014-12-10T21:32
HEYE 拼圖品質問題
By Sierra Rose
at 2014-12-09T23:22
at 2014-12-09T23:22