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.

User: Mark E. Shoulson

Mark E. Shoulson's wiki page.

Mark E. Shoulson has authored 3 sequences.

A246419 Numbers n such that n^6 - 2 is not squarefree.

Original entry on oeis.org

10, 22, 50, 143, 204, 267, 311, 312, 423, 455, 461, 479, 506, 556, 579, 600, 649, 818, 845, 889, 987, 1008, 1104, 1108, 1134, 1178, 1258, 1273, 1333, 1343, 1416, 1423, 1467, 1537, 1610, 1637, 1712, 1756, 1779, 2001, 2005, 2045, 2065, 2066, 2104, 2166, 2205
Offset: 1

Author

Mark E. Shoulson, Aug 25 2014

Keywords

Examples

			10^6 - 2 = 999998, which is divisible by 16129 = 127^2, so 10 is in the sequence.
11^6 - 2 = 1771559, which is prime, and 12^6 - 2 = 2985982 = 2 * 17 * 31 * 2833 (all prime), so neither of these numbers is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..3000] | not IsSquarefree(n^6-2)]; // Vincenzo Librandi, Oct 16 2014
  • Maple
    remove(t -> numtheory:-issqrfree(t^6-2), [$1..3000]); # Robert Israel, Aug 25 2014
  • Mathematica
    Select[Range[2000], MoebiusMu[#^6 - 2] == 0 &] (* Alonso del Arte, Aug 25 2014 *)
  • PARI
    isok(n) = ! issquarefree(n^6-2); \\ Michel Marcus, Oct 11 2014
    
  • Python
    from sympy import factorint
    [i for i in range(1, 500) if any(v>1 for v in factorint(i**6-2).values())]
    

A247025 Lengths of prefixes of the infinite string of digits repeat(1379) that are prime.

Original entry on oeis.org

2, 3, 7, 81, 223, 250, 255, 537, 543, 1042, 2103, 4285, 25015, 35361, 43525
Offset: 1

Author

Mark E. Shoulson, Sep 09 2014

Keywords

Comments

Every prime > 5 in base 10 ends in 1, 3, 7, or 9. If those digits are repeated, in order, some prefixes of that string are prime.
n such that floor(1379/9999 * 10^n) is prime. - Robert Israel, Sep 09 2014
a(13) > 15500. - Daniel Starodubtsev, Mar 16 2021

Examples

			1 and 3 are the first two digits of the string, and 13 is prime. 13 has length 2, so 2 is a term.
137 is prime and three digits long, so 3 is a term.
1379137 is prime and seven digits long, so 7 is a term.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..300] | IsPrime(Floor(1379/9999 * 10^n))]; // Vincenzo Librandi, Oct 17 2014
  • Mathematica
    Select[Range[4300],PrimeQ[FromDigits[PadRight[{},#,{1,3,7,9}]]]&] (* The program generates the first 12 terms of the sequence. *) (* Harvey P. Dale, Jun 11 2024 *)
  • PARI
    lista(nn) = {s = 0; digs = [1,3,7,9]; id = 1; for (n=1, nn, s = 10*s + digs[id]; if (isprime(s), print1(n, ", ")); id++; if (id==5, id = 1););} \\ Michel Marcus, Oct 11 2014
    
  • Python
    from sympy import isprime
    from itertools import cycle
    it=cycle([1,3,7,9])
    c=0
    a=0
    for i in it:
        c+=1
        a*=10
        a+=i
        if isprime(a):
            print(c)
    

Extensions

Edited. Name specified. Example reformulated. a(12) added (using R. Israel's formula). Keyword less and Crossreferences added. - Wolfdieter Lang, Nov 03 2014
a(13)-a(14) from Michael S. Branicky, May 29 2023
a(15) from Michael S. Branicky, Jun 13 2024

A242098 Numbers n such that the residue of n modulo floor(sqrt(n)) is prime.

Original entry on oeis.org

11, 14, 18, 19, 22, 23, 27, 28, 32, 33, 38, 39, 41, 44, 45, 47, 51, 52, 54, 58, 59, 61, 66, 67, 69, 71, 74, 75, 77, 79, 83, 84, 86, 88, 92, 93, 95, 97, 102, 103, 105, 107, 112, 113, 115, 117, 123, 124, 126, 128, 134, 135, 137, 139, 146, 147, 149
Offset: 1

Author

Mark E. Shoulson, Aug 14 2014

Keywords

Comments

Also, i^2+p(1), i^2+p(2),..., i^2+p(k), i^2+i+p(1), i^2+i+p(2),..., i^2+i+p(k), for i>=3, where p(n) is the n-th prime and p(k) is the largest prime strictly less than i.

Examples

			floor(sqrt(28)) = 5. 28 modulo 5 = 3, which is prime, so 28 is in the sequence.
		

Programs

  • Mathematica
    Select[Range[200],PrimeQ[ Mod[#,Floor[Sqrt[#]]]]&] (* Harvey P. Dale, May 31 2019 *)
  • PARI
    for(n=1, 10^3, if(isprime(n%sqrtint(n)), print1(n", "))) \\ Jens Kruse Andersen, Aug 16 2014
  • Python
    from sympy import isprime
    from math import sqrt, floor
    from itertools import count
    sequence = ( for  in count(1) if isprime( % floor(sqrt())))
    print([next(sequence) for i in range(50)])
    

Extensions

Added alternative formulation in comment.