高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
830: 05/09(金)06:19 ID:vIVXuysf(1) AAS
SequentialPrimeDigits[n_Integer] :=
Module[{p = 10, result = {}},
While[Length[result] < n,
If[PrimeQ[p] && AllDifferencesAreOneQ[p],
AppendTo[result, p]
];
p++
];
result
]

AllDifferencesAreOneQ[num_Integer] :=
Differences[IntegerDigits[num]] === ConstantArray[1, Length[IntegerDigits[num]] - 1]

SequentialPrimeDigits[5]

{23, 67, 89, 4567, 23456789}

SequentialPrimeDigits[20]
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.023s