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.

Previous Showing 11-16 of 16 results.

A066445 a(n) = 12^n mod n^12.

Original entry on oeis.org

0, 144, 1728, 20736, 248832, 2985984, 35831808, 429981696, 5159780352, 61917364224, 743008370688, 0, 13800864889148, 36652392292352, 96953703492618, 236674172846080, 568249606736865, 15868743229440, 1270692936983464, 2296447475122176, 1898727404471631, 8621343763677184
Offset: 1

Views

Author

Robert G. Wilson v, Dec 27 2001

Keywords

Crossrefs

Cf. A066606.

Programs

  • Mathematica
    Table[ Mod[12^n, n^12], {n, 1, 20} ]
    Table[PowerMod[12,n,n^12],{n,20}] (* Harvey P. Dale, Apr 05 2019 *)
  • PARI
    a(n) = { lift(Mod(12, n^12)^n) } \\ Harry J. Smith, Feb 14 2010

A066608 a(n) = 4^n mod n^4.

Original entry on oeis.org

0, 0, 64, 0, 399, 208, 1978, 0, 6265, 8576, 6978, 1792, 19075, 22864, 36199, 0, 17089, 87616, 31867, 107776, 83791, 142928, 195688, 225280, 201999, 302656, 362152, 304896, 401393, 546976, 612688, 0, 226279, 629152, 399674, 718336, 1132463
Offset: 1

Views

Author

Amarnath Murthy, Dec 22 2001

Keywords

Examples

			a(7) = 1978 as 4^7 = 16384 = (7^4)*6 + 1978.
		

Crossrefs

Cf. A066606.

Programs

  • Mathematica
    Table[PowerMod[4,n,n^4],{n,50}] (* Harvey P. Dale, Aug 25 2023 *)
  • PARI
    a(n) = { lift(Mod(4, n^4)^n) } \\ Harry J. Smith, Mar 11 2010

Extensions

More terms from Floor van Lamoen and Robert G. Wilson v, Dec 23 2001

A066609 a(n) = 5^n mod n^5.

Original entry on oeis.org

0, 25, 125, 625, 0, 73, 10897, 30177, 4508, 65625, 29672, 36433, 263034, 288873, 575000, 159681, 592030, 1485433, 1639363, 1240625, 250928, 928073, 4040001, 93601, 0, 10915033, 14288075, 16048657, 3176520, 4515625
Offset: 1

Views

Author

Amarnath Murthy, Dec 24 2001

Keywords

Examples

			a(6) = 73 as 5^6 = 15625 = (6^5)*2 + 73.
		

Crossrefs

Cf. A066606.

Programs

  • Mathematica
    Table[PowerMod[5,n,n^5],{n,30}] (* Harvey P. Dale, Jul 05 2023 *)
  • PARI
    a(n) = { lift(Mod(5, n^5)^n) } \\ Harry J. Smith, Mar 11 2010

Extensions

More terms from Robert G. Wilson v, Dec 26 2001

A066610 a(n) = 6^n mod n^6.

Original entry on oeis.org

0, 36, 216, 1296, 7776, 0, 44638, 106752, 511758, 466176, 1398612, 0, 4175671, 4282944, 2765826, 4259840, 20220503, 0, 36376760, 40062976, 25606125, 57077760, 109780662, 0, 144545126, 283401024, 0, 454885376, 299969829
Offset: 1

Views

Author

Amarnath Murthy, Dec 24 2001

Keywords

Examples

			a(7) = 44638 as 6^7 = 279936 = (7^6)*2 + 44638.
		

Crossrefs

Cf. A066606.

Programs

  • Mathematica
    Table[PowerMod[6,n,n^6],{n,30}] (* Harvey P. Dale, Jan 21 2019 *)
  • PARI
    a(n) = { lift(Mod(6, n^6)^n) } \\ Harry J. Smith, Mar 11 2010

Extensions

More terms from Robert G. Wilson v, Dec 26 2001

A188339 Primes p such that 2^p mod p^2 is prime.

Original entry on oeis.org

5, 53, 61, 193, 227, 257, 307, 317, 383, 457, 577, 601, 607, 653, 727, 751, 947, 1019, 1031, 1039, 1049, 1093, 1123, 1193, 1259, 1283, 1409, 1471, 1483, 1607, 1613, 1667, 1987, 2011, 2029, 2203, 2357, 2371, 2377, 2909, 2939, 3011, 3049, 3089, 3163
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 28 2011

Keywords

Examples

			5 is a term because 5 is prime and (2^5 mod 5^2) = 32 mod 25 = 7 also prime.
		

Crossrefs

Cf. A066606.

Programs

  • Mathematica
    Select[Prime[Range[500]], PrimeQ[PowerMod[2,#, #^2]] &] (* Alonso del Arte, Mar 28 2011 *)
  • PARI
    forprime(p=2, 10^3, if(isprime(2^p%p^2), print1(p, ", "))) \\ Felix Fröhlich, Jun 28 2014

A219219 Numbers k such that 2^k (mod k^2) is prime.

Original entry on oeis.org

5, 21, 53, 55, 61, 95, 111, 155, 165, 189, 193, 213, 221, 227, 245, 249, 257, 289, 291, 303, 305, 307, 317, 339, 345, 355, 363, 383, 385, 423, 429, 437, 457, 465, 477, 505, 577, 597, 601, 607, 621, 653, 655, 679, 705, 715, 727, 749, 751, 765, 781, 849, 889, 939
Offset: 1

Views

Author

Alex Ratushnyak, Nov 15 2012

Keywords

Comments

Indices of primes in A066606.

Crossrefs

Cf. A066606.

Programs

  • Java
    import java.math.BigInteger;
    public class A219219 {
      public static void main (String[] args) {
        BigInteger b2 = BigInteger.valueOf(2);
        for (int n=1; ; n++) {
          BigInteger bn = BigInteger.valueOf(n);
          BigInteger pp  = b2.modPow(bn, bn.multiply(bn));
          if (pp.isProbablePrime(2)) {
              if (pp.isProbablePrime(80))
                  System.out.printf("%d, ",n);
          }
        }
      }
    }
    
  • Maple
    a:= proc(n) option remember; local k;
          for k from 1+ `if`(n=1, 0, a(n-1))
          while not isprime(2 &^k mod k^2) do od; k
        end:
    seq (a(n), n=1..100);  # Alois P. Heinz, Nov 17 2012
  • Mathematica
    Flatten[Position[Table[PowerMod[2, k, k^2], {k, 1000}], ?(PrimeQ[#] &)]] (* _T. D. Noe, Nov 15 2012 *)
    Select[Range[1000],PrimeQ[PowerMod[2,#,#^2]]&] (* Harvey P. Dale, Mar 29 2020 *)
  • Python
    from sympy import isprime
    def aupto(limit):
      alst = []
      for k in range(1, limit+1):
        if isprime(pow(2, k, k*k)): alst.append(k)
      return alst
    print(aupto(939)) # Michael S. Branicky, May 21 2021
Previous Showing 11-16 of 16 results.