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.

A180197 a(n) is 2^(p*q) mod r for the n-th odd number with exactly 3 distinct prime factors p < q < r.

Original entry on oeis.org

1, 10, 8, 2, 9, 5, 12, 16, 15, 10, 8, 5, 27, 7, 1, 12, 23, 2, 8, 17, 9, 12, 2, 2, 9, 10, 9, 11, 8, 1, 29, 14, 4, 2, 23, 18, 42, 11, 9, 3, 12, 12, 6, 5, 12, 8, 2, 37, 1, 64, 2, 48, 18, 13, 62, 16, 14, 15, 56, 66, 1, 33, 19, 15, 4, 16, 33, 52, 32, 9
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 16 2011

Keywords

Comments

The lines with negative slope appearing to rise out of plots is caused by pq = 15 and large r. - T. D. Noe, Jul 28 2011

Examples

			a(1) = 2^(3*5) mod 7 = 32768 mod 7 = 1 because A046389(1) = 105 = 3*5*7.
		

Crossrefs

Cf. A046389.
Cf. A027746.

Programs

  • Haskell
    import Data.List (nub)
    a180197 n = a180197_list !! (n-1)
    a180197_list = f 1 where
       f x = if length ps == 3 && nub ps == ps
             then (2 ^ (ps!!0 * ps!!1) `mod` ps!!2) : f (x+2) else f (x+2)
             where ps = a027746_row x
    -- Reinhard Zumkeller, Jan 29 2014
  • Maple
    b:= proc(n) option remember; local i, k, l;
           if n=1 then 3,5,7
           else for k from mul(i, i=b(n-1)) +2 by 2
                  do l:= ifactors(k)[2];
                     if nops(l) = 3 and add(i[2], i=l) = 3
                        then break fi
                  od; sort(map(i-> i[1], l))[]
           fi
        end:
    a:= proc(n) option remember; local p, q, r;
          p,q,r:= b(n);
          2 &^ (p*q) mod r
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Jan 17 2011
  • Mathematica
    Reap[For[n = 105, n < 2000, n += 2, f = FactorInteger[n] // Transpose; If[f[[2]] == {1, 1, 1}, {p, q, r} = f[[1]]; Sow[Mod[2^(p*q), r]]]]][[2, 1]] (* Jean-François Alcover, Oct 24 2016 *)

Extensions

More terms from Alois P. Heinz, Jan 17 2011