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.

Showing 1-3 of 3 results.

A156981 Numbers n with property that n^2 and (n+1)^2 have no common digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 14, 19, 22, 29, 44, 77, 94, 264, 1414, 5477
Offset: 1

Views

Author

Zak Seidov, Feb 20 2009

Keywords

Comments

Sequence is full, cf. A068802.

Crossrefs

Cf. A068802.

Programs

  • PARI
    isok(n) = length(setintersect(Set(digits(n^2)), Set(digits((n+1)^2)))) == 0; \\ Michel Marcus, Oct 15 2013

Formula

a(n) = sqrt(A068802(n)).

A156993 a(n) = the least positive k such that n^2 and (n+k)^2 have no common digits, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 6, 5, 9, 3, 2, 1, 4, 4, 2, 6, 1, 3, 2, 1, 3, 5, 3, 3, 2, 2, 1, 4, 14, 31, 25, 13, 23, 26, 8, 7, 19, 17, 4, 3, 2, 1, 11, 16, 9, 28, 14, 6, 11, 4, 3, 8, 12, 9, 19, 19, 16, 5, 3, 13, 2, 21, 18, 23, 8, 22, 4, 5, 12, 14, 5, 16, 13, 14, 1, 7, 118, 5, 7, 8, 2, 7, 5, 4, 3, 2, 3, 66
Offset: 0

Views

Author

Zak Seidov, Feb 20 2009

Keywords

Comments

a(n)=1 for 18 values of n = sqrt(A068802);
for n<=1000, a(n)=0 for 22 values of n:
304,353,364,403,407,442,443,463,508,514,589,593,629,634,661,704,736,737,778, 805,807,818.
a(304)=0 because 304^2=92416 and no square can avoid one of digits 1,2,4,6,9:
each square ends with digits 1,4,5,6, or 9 (end zero doesn't matter), and if square ends with 5, then previous digit is 2;
also, a(353)=0 because 353^2=124609 and no square can avoid one of the same digits 1,2,4,6,9.

Examples

			a(0)=1 because squares 0^2=0 and (0+1)^2=1 have no common digits, a(9)=6 because squares 9^2=81 and (9+6)^2=225 have no common digits.
		

Crossrefs

Programs

  • Mathematica
    lpk[n_]:=Module[{k=1},While[ContainsAny[IntegerDigits[n^2], IntegerDigits[ (n+k)^2]], k++];k]Array[lpk,100,0] (* Harvey P. Dale, Jun 17 2016 *)

A361173 Numbers k such that, in base 4, the greatest prime less than 4^k and the least prime greater than 4^k have no common digit.

Original entry on oeis.org

1, 4, 28, 83, 1816
Offset: 1

Views

Author

Lewis Baxter, Mar 02 2023

Keywords

Comments

In base 4 all consecutive primes with no common digit are of this form, except for 2 and 3.
It is unknown whether this sequence is infinite.
Base 2 and base 3 have no such primes.

Examples

			k=4 is a term: the consecutive primes are 251 and 257. In base 4 their representations are 3323 and 10001, which have no common digit.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], ! IntersectingQ @@ IntegerDigits[NextPrime[4^#, {-1, 1}], 4] &] (* Amiram Eldar, Mar 03 2023 *)
  • PARI
    isok(k) = #setintersect(Set(digits(precprime(4^k), 4)), Set(digits(nextprime(4^k), 4))) == 0; \\ Michel Marcus, Mar 03 2023
    
  • Python
    from sympy.ntheory import digits, nextprime, prevprime
    def ok(n):
        p, q = prevprime(4**n), nextprime(4**n)
        return set(digits(p, 4)[1:]) & set(digits(q, 4)[1:]) == set()
    print([k for k in range(1, 99) if ok(k)]) # Michael S. Branicky, Mar 03 2023
Showing 1-3 of 3 results.