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.

A258599 a(n) is the index m such that A001694(m) = prime(n)^2.

Original entry on oeis.org

2, 4, 6, 10, 16, 20, 28, 31, 39, 48, 51, 65, 71, 75, 84, 94, 107, 110, 120, 129, 133, 145, 152, 163, 180, 187, 191, 199, 202, 212, 238, 246, 258, 261, 282, 286, 297, 309, 319, 330, 342, 344, 366, 372, 377, 382, 407, 431, 440, 443, 450, 463, 468, 487, 498
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2015

Keywords

Examples

			.   n |  p |  a(n) | A001694(a(n)) = A001248(n) = p^2
. ----+----+-------+---------------------------------
.   1 |  2 |     2 |             4
.   2 |  3 |     4 |             9
.   3 |  5 |     6 |            25
.   4 |  7 |    10 |            49
.   5 | 11 |    16 |           121
.   6 | 13 |    20 |           169
.   7 | 17 |    28 |           289
.   8 | 19 |    31 |           361
.   9 | 23 |    39 |           529
.  10 | 29 |    48 |           841
.  11 | 31 |    51 |           961
.  12 | 37 |    65 |          1369
.  13 | 41 |    71 |          1681
.  14 | 43 |    75 |          1849
.  15 | 47 |    84 |          2209
.  16 | 53 |    94 |          2809
.  17 | 59 |   107 |          3481
.  18 | 61 |   110 |          3721
.  19 | 67 |   120 |          4489
.  20 | 71 |   129 |          5041
.  21 | 73 |   133 |          5329
.  22 | 79 |   145 |          6241
.  23 | 83 |   152 |          6889
.  24 | 89 |   163 |          7921
.  25 | 97 |   180 |          9409  .
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a258599 = (+ 1) . fromJust . (`elemIndex` a258567_list) . a000040
    
  • Mathematica
    With[{m = 60}, c = Select[Range[Prime[m]^2], Min[FactorInteger[#][[;; , 2]]] > 1 &]; 1 + Flatten[FirstPosition[c, #] & /@ (Prime[Range[m]]^2)]] (* Amiram Eldar, Feb 07 2023 *)
  • Python
    from math import isqrt
    from sympy import prime, integer_nthroot, factorint
    def A258599(n):
        m = prime(n)**2
        return int(sum(isqrt(m//k**3) for k in range(1, integer_nthroot(m, 3)[0]+1) if all(d<=1 for d in factorint(k).values()))) # Chai Wah Wu, Sep 10 2024

Formula

A001694(a(n)) = A001248(n) = prime(n)^2.
A001694(m) mod prime(n) > 0 for m < a(n).
Also smallest number m such that A258567(m) = prime(n):
A258567(a(n)) = A000040(n) and A258567(m) != A000040(n) for m < a(n).