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.

A064924 If n is prime then a(n) = n; for the subsequent nonprime positions a(n + k) = (k+1)*n; then at the next prime position a new subsequence begins.

This page as a plain text file.
%I A064924 #25 Jun 20 2018 01:31:00
%S A064924 2,3,6,5,10,7,14,21,28,11,22,13,26,39,52,17,34,19,38,57,76,23,46,69,
%T A064924 92,115,138,29,58,31,62,93,124,155,186,37,74,111,148,41,82,43,86,129,
%U A064924 172,47,94,141,188,235,282,53,106,159,212,265,318,59,118,61,122,183,244
%N A064924 If n is prime then a(n) = n; for the subsequent nonprime positions a(n + k) = (k+1)*n; then at the next prime position a new subsequence begins.
%C A064924 A064920(a(n)) = n.
%H A064924 R. Zumkeller, <a href="/A064924/b064924.txt">Table of n, a(n) for n = 2..10000</a>
%F A064924 a(n) = A007917(n) * (A064722(n) + 1)
%e A064924 a(7) = A007917(7) * (A064722(7) + 1) = 7 * (0 + 1) = 7; a(8) = A007917(8) * (A064722(8) + 1) = 7 * (1 + 1) = 14; a(9) = A007917(9) * (A064722(9) + 1) = 7 * (2 + 1) = 21; a(10) = A007917(10) * (A064722(10) + 1) = 7 * (3 + 1) = 28; a(11) = 11.
%t A064924 a[n_?PrimeQ] := n; a[n_] := NextPrime[n, -1]*(n - NextPrime[n, -1] + 1); Table[a[n], {n, 2, 64}] (* _Jean-François Alcover_, Sep 19 2011 *)
%t A064924 Flatten[First[#]Range[Last[#]-First[#]]&/@Partition[Prime[Range[20]],2,1]] (* _Harvey P. Dale_, May 03 2012 *)
%o A064924 (PARI) { for (n=2, 10000, if (isprime(n), a=m=n; k=2, a=k*m; k++); write("b064924.txt", n, " ", a) ) } \\ _Harry J. Smith_, Sep 29 2009
%o A064924 (Haskell)
%o A064924 import Data.List (genericTake)
%o A064924 a064924 n = a064924_list !! (n-1)
%o A064924 a064924_list = concat $ zipWith (\p g -> genericTake g [p, 2 * p ..])
%o A064924    a000040_list $ zipWith (-) (tail a000040_list) a000040_list
%o A064924 -- _Reinhard Zumkeller_, Jul 05 2013
%Y A064924 Cf. A064920, A064923, A007917, A064722, A064919.
%K A064924 nice,nonn,look
%O A064924 2,1
%A A064924 _Reinhard Zumkeller_, Oct 14 2001